Add prettier for js/css/vue code style fixes

This commit is contained in:
DariusIII
2019-02-01 11:10:27 +01:00
parent 198e646306
commit f71bd50a3e
11 changed files with 7709 additions and 5283 deletions
+2
View File
@@ -0,0 +1,2 @@
public/
vendor/
+6
View File
@@ -0,0 +1,6 @@
{
"printWidth": 100,
"singleQuote": true,
"tabWidth": 4,
"trailingComma": "es5"
}
+1
View File
@@ -1,4 +1,5 @@
2019-02-01 DariusIII
* Chg: Add prettier for css/js/vue files code style fixes
* Chg: Update sebastian/environment (4.0.2 => 4.1.0)
* Chg: Update phpunit/phpunit (7.5.2 => 7.5.3)
2019-01-31 DariusIII
+1
View File
@@ -7,6 +7,7 @@
<a href="https://packagist.org/packages/nntmux/newznab-tmux"><img src="https://poser.pugx.org/nntmux/newznab-tmux/license.svg" alt="License"></a>
<a href="https://styleci.io/repos/22602573"><img src="https://styleci.io/repos/22602573/shield?branch=dev" alt="StyleCI"></a>
<a href='https://coveralls.io/github/NNTmux/newznab-tmux?branch=0.x'><img src='https://coveralls.io/repos/github/NNTmux/newznab-tmux/badge.svg?branch=dev' alt='Coverage Status' /></a>
<a href="https://github.com/prettier/prettier"><img src=https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square"></a>
<a href="https://www.patreon.com/bePatron?u=6160908"><img src="https://c5.patreon.com/external/logo/become_a_patron_button.png" alt="Become a Patron!" height="35"></a>
</p>
+3 -1
View File
@@ -7,7 +7,8 @@
"watch-poll": "npm run watch -- --watch-poll",
"hot": "cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js",
"prod": "npm run production",
"production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --no-progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js"
"production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --no-progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
"format": "prettier --write 'resources/**/*.{css,js,vue}'"
},
"devDependencies": {
"axios": "^0.18",
@@ -16,6 +17,7 @@
"laravel-mix": "^4.0.14",
"lodash": "^4.17.11",
"popper.js": "^1.14.7",
"prettier": "1.16.3",
"vue": "^2.5.22"
},
"dependencies": {
File diff suppressed because it is too large Load Diff
+1 -2
View File
@@ -1,4 +1,3 @@
/**
* First we will load all of this project's JavaScript dependencies which
* includes Vue and other libraries. It is a great starting point when
@@ -18,5 +17,5 @@ window.Vue = require('vue');
Vue.component('example-component', require('./components/ExampleComponent.vue'));
const app = new Vue({
el: '#app'
el: '#app',
});
@@ -17,7 +17,7 @@
<script>
export default {
mounted() {
console.log('Component mounted.')
}
}
console.log('Component mounted.');
},
};
</script>
+3674 -2531
View File
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+277 -243
View File
@@ -4,37 +4,41 @@
* @param id group id
* @param status 0 = deactive, 1 = activate
*/
function ajax_group_status(id, what)
{
function ajax_group_status(id, what) {
// no caching of results
var rand_no = Math.random();
if (what != undefined)
{
if (what != undefined) {
$.ajax({
url: WWW_TOP + '/admin/ajax?action=toggle_group_active_status&rand=' + rand_no,
data: { group_id: id, group_status: what },
dataType : "html",
success : function(data)
{
dataType: 'html',
success: function(data) {
$('div#message').html(data);
$('div#message').show('fast', function() {});
// switch some links around
if (what == 0) {
$('td#group-' + id).html('<a href="javascript:ajax_group_status('+ id +', 1)" class="group_deactive">Activate</a>');
}
else {
$('td#group-' + id).html('<a href="javascript:ajax_group_status('+ id +', 0)" class="group_active">Deactivate</a>');
$('td#group-' + id).html(
'<a href="javascript:ajax_group_status(' +
id +
', 1)" class="group_deactive">Activate</a>'
);
} else {
$('td#group-' + id).html(
'<a href="javascript:ajax_group_status(' +
id +
', 0)" class="group_active">Deactivate</a>'
);
}
// fade.. mm
$('#message').fadeOut(5000);
},
error: function(xhr,err,e) { alert( "Error in ajax_group_status: " + err ); }
error: function(xhr, err, e) {
alert('Error in ajax_group_status: ' + err);
},
});
}
else
{
} else {
alert('Weird.. what group id are looking for?');
}
}
@@ -45,37 +49,41 @@ function ajax_group_status(id, what)
* @param id site id
* @param status 0 = deactive, 1 = activate
*/
function ajax_sharing_site_status(id, status)
{
function ajax_sharing_site_status(id, status) {
// no caching of results
var rand_no = Math.random();
if (status != undefined)
{
if (status != undefined) {
$.ajax({
url: WWW_TOP + '/admin/ajax?action=sharing_toggle_status&rand=' + rand_no,
data: { site_id: id, site_status: status },
dataType : "html",
success : function(data)
{
dataType: 'html',
success: function(data) {
$('div#message').html(data);
$('div#message').show('fast', function() {});
// switch some links around
if (status == 0) {
$('td#site-' + id).html('<a href="javascript:ajax_sharing_site_status('+ id +', 1)" class="sharing_site_deactive">Enable</a>');
}
else {
$('td#site-' + id).html('<a href="javascript:ajax_sharing_site_status('+ id +', 0)" class="sharing_site_active">Disable</a>');
$('td#site-' + id).html(
'<a href="javascript:ajax_sharing_site_status(' +
id +
', 1)" class="sharing_site_deactive">Enable</a>'
);
} else {
$('td#site-' + id).html(
'<a href="javascript:ajax_sharing_site_status(' +
id +
', 0)" class="sharing_site_active">Disable</a>'
);
}
// fade.. mm
$('#message').fadeOut(5000);
},
error: function(xhr,err,e) { alert( "Error in ajax_sharing_site_status: " + err ); }
error: function(xhr, err, e) {
alert('Error in ajax_sharing_site_status: ' + err);
},
});
}
else
{
} else {
alert('Weird.. what site id are looking for?');
}
}
@@ -86,37 +94,41 @@ function ajax_sharing_site_status(id, status)
* @param id
* @param status 0 = deactive, 1 = activate
*/
function ajax_sharing_enabled(id, status)
{
function ajax_sharing_enabled(id, status) {
// no caching of results
var rand_no = Math.random();
if (status != undefined)
{
if (status != undefined) {
$.ajax({
url: WWW_TOP + '/admin/ajax?action=sharing_toggle_enabled&rand=' + rand_no,
data: { enabled_status: status },
dataType : "html",
success : function(data)
{
dataType: 'html',
success: function(data) {
$('div#message').html(data);
$('div#message').show('fast', function() {});
// switch some links around
if (status == 0) {
$('strong#enabled-' + id).html('<a title="Click this to enable sharing." href="javascript:ajax_sharing_enabled('+ id +', 1)" class="sharing_enabled_deactive">[ENABLE]</a>');
}
else {
$('strong#enabled-' + id).html('<a title="Click this to disable sharing." href="javascript:ajax_sharing_enabled('+ id +', 0)" class="sharing_enabled_active">[DISABLE]</a>');
$('strong#enabled-' + id).html(
'<a title="Click this to enable sharing." href="javascript:ajax_sharing_enabled(' +
id +
', 1)" class="sharing_enabled_deactive">[ENABLE]</a>'
);
} else {
$('strong#enabled-' + id).html(
'<a title="Click this to disable sharing." href="javascript:ajax_sharing_enabled(' +
id +
', 0)" class="sharing_enabled_active">[DISABLE]</a>'
);
}
// fade.. mm
$('#message').fadeOut(5000);
},
error: function(xhr,err,e) { alert( "Error in ajax_sharing_enabled: " + err ); }
error: function(xhr, err, e) {
alert('Error in ajax_sharing_enabled: ' + err);
},
});
}
else
{
} else {
alert('Weird.. what enabled id are looking for?');
}
}
@@ -127,37 +139,41 @@ function ajax_sharing_enabled(id, status)
* @param id
* @param status 0 = deactive, 1 = activate
*/
function ajax_sharing_startposition(id, status)
{
function ajax_sharing_startposition(id, status) {
// no caching of results
var rand_no = Math.random();
if (status != undefined)
{
if (status != undefined) {
$.ajax({
url: WWW_TOP + '/admin/ajax?action=sharing_start_position&rand=' + rand_no,
data: { start_position: status },
dataType : "html",
success : function(data)
{
dataType: 'html',
success: function(data) {
$('div#message').html(data);
$('div#message').show('fast', function() {});
// switch some links around
if (status == 0) {
$('strong#startposition-' + id).html('<a title="Click this to enable backfill." href="javascript:ajax_sharing_startposition('+ id +', 1)" class="sharing_enabled_deactive">[ENABLE]</a>');
}
else {
$('strong#startposition-' + id).html('<a title="Click this to disable backfill." href="javascript:ajax_sharing_startposition('+ id +', 0)" class="sharing_enabled_active">[DISABLE]</a>');
$('strong#startposition-' + id).html(
'<a title="Click this to enable backfill." href="javascript:ajax_sharing_startposition(' +
id +
', 1)" class="sharing_enabled_deactive">[ENABLE]</a>'
);
} else {
$('strong#startposition-' + id).html(
'<a title="Click this to disable backfill." href="javascript:ajax_sharing_startposition(' +
id +
', 0)" class="sharing_enabled_active">[DISABLE]</a>'
);
}
// fade.. mm
$('#message').fadeOut(5000);
},
error: function(xhr,err,e) { alert( "Error in ajax_sharing_startposition: " + err ); }
error: function(xhr, err, e) {
alert('Error in ajax_sharing_startposition: ' + err);
},
});
}
else
{
} else {
alert('Weird.. what enabled id are looking for?');
}
}
@@ -167,15 +183,13 @@ function ajax_sharing_startposition(id, status)
*
* @param id
*/
function ajax_sharing_reset(id)
{
function ajax_sharing_reset(id) {
var rand_no = Math.random();
$.ajax({
url: WWW_TOP + '/admin/ajax?action=sharing_reset_settings&rand=' + rand_no,
data: { reset_settings: id },
dataType : "html",
success : function(data)
{
dataType: 'html',
success: function(data) {
$('div#message').html(data);
$('div#message').show('fast', function() {});
@@ -183,7 +197,9 @@ function ajax_sharing_reset(id)
$('#message').fadeOut(5000);
setTimeout('history.go(0);', 1500);
},
error: function(xhr,err,e) { alert( "Error in ajax_sharing_reset: " + err ); }
error: function(xhr, err, e) {
alert('Error in ajax_sharing_reset: ' + err);
},
});
}
@@ -192,15 +208,13 @@ function ajax_sharing_reset(id)
*
* @param id
*/
function ajax_sharing_site_purge(id)
{
function ajax_sharing_site_purge(id) {
var rand_no = Math.random();
$.ajax({
url: WWW_TOP + '/admin/ajax?action=sharing_purge_site&rand=' + rand_no,
data: { purge_site: id },
dataType : "html",
success : function(data)
{
dataType: 'html',
success: function(data) {
$('div#message').html(data);
$('div#message').show('fast', function() {});
@@ -208,7 +222,9 @@ function ajax_sharing_site_purge(id)
$('#message').fadeOut(5000);
setTimeout('history.go(0);', 1500);
},
error: function(xhr,err,e) { alert( "Error in ajax_sharing_site_purge: " + err ); }
error: function(xhr, err, e) {
alert('Error in ajax_sharing_site_purge: ' + err);
},
});
}
@@ -218,37 +234,41 @@ function ajax_sharing_site_purge(id)
* @param id
* @param status 0 = deactive, 1 = activate
*/
function ajax_sharing_posting(id, status)
{
function ajax_sharing_posting(id, status) {
// no caching of results
var rand_no = Math.random();
if (status != undefined)
{
if (status != undefined) {
$.ajax({
url: WWW_TOP + '/admin/ajax?action=sharing_toggle_posting&rand=' + rand_no,
data: { posting_status: status },
dataType : "html",
success : function(data)
{
dataType: 'html',
success: function(data) {
$('div#message').html(data);
$('div#message').show('fast', function() {});
// switch some links around
if (status == 0) {
$('strong#posting-' + id).html('<a title="Click this to enable posting." href="javascript:ajax_sharing_posting('+ id +', 1)" class="sharing_posting_deactive">[ENABLE]</a>');
}
else {
$('strong#posting-' + id).html('<a title="Click this to disable posting." href="javascript:ajax_sharing_posting('+ id +', 0)" class="sharing_posting_active">[DISABLE]</a>');
$('strong#posting-' + id).html(
'<a title="Click this to enable posting." href="javascript:ajax_sharing_posting(' +
id +
', 1)" class="sharing_posting_deactive">[ENABLE]</a>'
);
} else {
$('strong#posting-' + id).html(
'<a title="Click this to disable posting." href="javascript:ajax_sharing_posting(' +
id +
', 0)" class="sharing_posting_active">[DISABLE]</a>'
);
}
// fade.. mm
$('#message').fadeOut(5000);
},
error: function(xhr,err,e) { alert( "Error in ajax_sharing_posting: " + err ); }
error: function(xhr, err, e) {
alert('Error in ajax_sharing_posting: ' + err);
},
});
}
else
{
} else {
alert('Weird.. what posting id are looking for?');
}
}
@@ -259,37 +279,41 @@ function ajax_sharing_posting(id, status)
* @param id
* @param status 0 = deactive, 1 = activate
*/
function ajax_sharing_fetching(id, status)
{
function ajax_sharing_fetching(id, status) {
// no caching of results
var rand_no = Math.random();
if (status != undefined)
{
if (status != undefined) {
$.ajax({
url: WWW_TOP + '/admin/ajax?action=sharing_toggle_fetching&rand=' + rand_no,
data: { fetching_status: status },
dataType : "html",
success : function(data)
{
dataType: 'html',
success: function(data) {
$('div#message').html(data);
$('div#message').show('fast', function() {});
// switch some links around
if (status == 0) {
$('strong#fetching-' + id).html('<a title="Click this to enable posting." href="javascript:ajax_fetching_posting('+ id +', 1)" class="sharing_fetching_deactive">[ENABLE]</a>');
}
else {
$('strong#fetching-' + id).html('<a title="Click this to disable sharing." href="javascript:ajax_fetching_posting('+ id +', 0)" class="sharing_fetching_active">[DISABLE]</a>');
$('strong#fetching-' + id).html(
'<a title="Click this to enable posting." href="javascript:ajax_fetching_posting(' +
id +
', 1)" class="sharing_fetching_deactive">[ENABLE]</a>'
);
} else {
$('strong#fetching-' + id).html(
'<a title="Click this to disable sharing." href="javascript:ajax_fetching_posting(' +
id +
', 0)" class="sharing_fetching_active">[DISABLE]</a>'
);
}
// fade.. mm
$('#message').fadeOut(5000);
},
error: function(xhr,err,e) { alert( "Error in ajax_sharing_fetching: " + err ); }
error: function(xhr, err, e) {
alert('Error in ajax_sharing_fetching: ' + err);
},
});
}
else
{
} else {
alert('Weird.. what fetching id are looking for?');
}
}
@@ -300,37 +324,41 @@ function ajax_sharing_fetching(id, status)
* @param id
* @param status 0 = deactive, 1 = activate
*/
function ajax_sharing_auto(id, status)
{
function ajax_sharing_auto(id, status) {
// no caching of results
var rand_no = Math.random();
if (status != undefined)
{
if (status != undefined) {
$.ajax({
url: WWW_TOP + '/admin/ajax?action=sharing_toggle_site_auto_enabling&rand=' + rand_no,
data: { auto_status: status },
dataType : "html",
success : function(data)
{
dataType: 'html',
success: function(data) {
$('div#message').html(data);
$('div#message').show('fast', function() {});
// switch some links around
if (status == 0) {
$('strong#auto-' + id).html('<a title="Click this to enable auto-enable." href="javascript:ajax_auto_posting('+ id +', 1)" class="sharing_auto_deactive">[ENABLE]</a>');
}
else {
$('strong#auto-' + id).html('<a title="Click this to disable auto-enable." href="javascript:ajax_auto_posting('+ id +', 0)" class="sharing_auto_active">[DISABLE]</a>');
$('strong#auto-' + id).html(
'<a title="Click this to enable auto-enable." href="javascript:ajax_auto_posting(' +
id +
', 1)" class="sharing_auto_deactive">[ENABLE]</a>'
);
} else {
$('strong#auto-' + id).html(
'<a title="Click this to disable auto-enable." href="javascript:ajax_auto_posting(' +
id +
', 0)" class="sharing_auto_active">[DISABLE]</a>'
);
}
// fade.. mm
$('#message').fadeOut(5000);
},
error: function(xhr,err,e) { alert( "Error in ajax_sharing_auto: " + err ); }
error: function(xhr, err, e) {
alert('Error in ajax_sharing_auto: ' + err);
},
});
}
else
{
} else {
alert('Weird.. what auto id are looking for?');
}
}
@@ -341,37 +369,41 @@ function ajax_sharing_auto(id, status)
* @param id
* @param status 0 = deactive, 1 = activate
*/
function ajax_sharing_hide(id, status)
{
function ajax_sharing_hide(id, status) {
// no caching of results
var rand_no = Math.random();
if (status != undefined)
{
if (status != undefined) {
$.ajax({
url: WWW_TOP + '/admin/ajax?action=sharing_toggle_hide_users&rand=' + rand_no,
data: { hide_status: status },
dataType : "html",
success : function(data)
{
dataType: 'html',
success: function(data) {
$('div#message').html(data);
$('div#message').show('fast', function() {});
// switch some links around
if (status == 0) {
$('strong#hide-' + id).html('<a title="Click this to enable hiding users." href="javascript:ajax_hide_posting('+ id +', 1)" class="sharing_hide_deactive">[ENABLE]</a>');
}
else {
$('strong#hide-' + id).html('<a title="Click this to disable hiding users." href="javascript:ajax_hide_posting('+ id +', 0)" class="sharing_hide_active">[DISABLE]</a>');
$('strong#hide-' + id).html(
'<a title="Click this to enable hiding users." href="javascript:ajax_hide_posting(' +
id +
', 1)" class="sharing_hide_deactive">[ENABLE]</a>'
);
} else {
$('strong#hide-' + id).html(
'<a title="Click this to disable hiding users." href="javascript:ajax_hide_posting(' +
id +
', 0)" class="sharing_hide_active">[DISABLE]</a>'
);
}
// fade.. mm
$('#message').fadeOut(5000);
},
error: function(xhr,err,e) { alert( "Error in ajax_sharing_hide: " + err ); }
error: function(xhr, err, e) {
alert('Error in ajax_sharing_hide: ' + err);
},
});
}
else
{
} else {
alert('Weird.. what hide id are looking for?');
}
}
@@ -381,20 +413,16 @@ function ajax_sharing_hide(id, status)
*
* @param status
*/
function ajax_sharing_toggle_all(status)
{
function ajax_sharing_toggle_all(status) {
// no caching of results
var rand_no = Math.random();
if (status != undefined)
{
if (status != undefined) {
$.ajax({
url: WWW_TOP + '/admin/ajax?action=sharing_toggle_all_sites&rand=' + rand_no,
data: { toggle_all: status },
dataType : "html"
dataType: 'html',
});
}
else
{
} else {
alert('Weird.. what toggle status are you looking for?');
}
}
@@ -405,37 +433,41 @@ function ajax_sharing_toggle_all(status)
* @param id group id
* @param status 0 = deactive, 1 = activate
*/
function ajax_backfill_status(id, what)
{
function ajax_backfill_status(id, what) {
// no caching of results
var rand_no = Math.random();
if (what != undefined)
{
if (what != undefined) {
$.ajax({
url: WWW_TOP + '/admin/ajax?action=toggle_group_backfill_status&rand=' + rand_no,
data: { group_id: id, backfill_status: what },
dataType : "html",
success : function(data)
{
dataType: 'html',
success: function(data) {
$('div#message').html(data);
$('div#message').show('fast', function() {});
// switch some links around
if (what == 0) {
$('td#backfill-' + id).html('<a href="javascript:ajax_backfill_status('+ id +', 1)" class="backfill_deactive">Activate</a>');
}
else {
$('td#backfill-' + id).html('<a href="javascript:ajax_backfill_status('+ id +', 0)" class="backfill_active">Deactivate</a>');
$('td#backfill-' + id).html(
'<a href="javascript:ajax_backfill_status(' +
id +
', 1)" class="backfill_deactive">Activate</a>'
);
} else {
$('td#backfill-' + id).html(
'<a href="javascript:ajax_backfill_status(' +
id +
', 0)" class="backfill_active">Deactivate</a>'
);
}
// fade.. mm
$('#message').fadeOut(5000);
},
error: function(xhr,err,e) { alert( "Error in ajax_backfill_status: " + err ); }
error: function(xhr, err, e) {
alert('Error in ajax_backfill_status: ' + err);
},
});
}
else
{
} else {
alert('Weird.. what group id are looking for?');
}
}
@@ -445,22 +477,22 @@ function ajax_backfill_status(id, what)
*
* @param id group id
*/
function ajax_group_delete(id)
{
function ajax_group_delete(id) {
// no caching of results
var rand_no = Math.random();
$.ajax({
url: WWW_TOP + '/admin/ajax?action=group_edit_delete_single&rand=' + rand_no,
data: { group_id: id },
dataType : "html",
success : function(data)
{
dataType: 'html',
success: function(data) {
$('div#message').html(data);
$('div#message').show('fast', function() {});
$('#grouprow-' + id).fadeOut(2000);
$('#message').fadeOut(5000);
},
error: function(xhr,err,e) { alert( "Error in ajax_group_delete: " + err ); }
error: function(xhr, err, e) {
alert('Error in ajax_group_delete: ' + err);
},
});
}
@@ -469,22 +501,22 @@ function ajax_group_delete(id)
*
* @param id group id
*/
function ajax_group_reset(id)
{
function ajax_group_reset(id) {
// no caching of results
var rand_no = Math.random();
$.ajax({
url: WWW_TOP + '/admin/ajax?action=group_edit_reset_single&rand=' + rand_no,
data: { group_id: id },
dataType : "html",
success : function(data)
{
dataType: 'html',
success: function(data) {
$('div#message').html(data);
$('div#message').show('fast', function() {});
$('#grouprow-' + id).fadeTo(2000, 0.5);
$('#message').fadeOut(5000);
},
error: function(xhr,err,e) { alert( "Error in ajax_group_reset: " + err ); }
error: function(xhr, err, e) {
alert('Error in ajax_group_reset: ' + err);
},
});
}
@@ -493,22 +525,22 @@ function ajax_group_reset(id)
*
* @param id group id
*/
function ajax_group_purge(id)
{
function ajax_group_purge(id) {
// no caching of results
var rand_no = Math.random();
$.ajax({
url: WWW_TOP + '/admin/ajax?action=group_edit_purge_single&rand=' + rand_no,
data: { group_id: id },
dataType : "html",
success : function(data)
{
dataType: 'html',
success: function(data) {
$('div#message').html(data);
$('div#message').show('fast', function() {});
$('#grouprow-' + id).fadeTo(2000, 0.5);
$('#message').fadeOut(5000);
},
error: function(xhr,err,e) { alert( "Error in ajax_group_purge: " + err ); }
error: function(xhr, err, e) {
alert('Error in ajax_group_purge: ' + err);
},
});
}
@@ -517,44 +549,44 @@ function ajax_group_purge(id)
*
*
*/
function ajax_all_reset()
{
function ajax_all_reset() {
// no caching of results
var rand_no = Math.random();
$.ajax({
url: WWW_TOP + '/admin/ajax?action=group_edit_reset_all&rand=' + rand_no,
data : "All groups reset.",
dataType : "html",
success : function(data)
{
data: 'All groups reset.',
dataType: 'html',
success: function(data) {
$('div#message').html(data);
$('div#message').show('fast', function() {});
$('#grouprow-' + id).fadeTo(2000, 0.5);
$('#message').fadeOut(5000);
},
error: function(xhr,err,e) { alert( "Error in ajax_all_reset: " + err ); }
error: function(xhr, err, e) {
alert('Error in ajax_all_reset: ' + err);
},
});
}
/**
* ajax_all_purge()
*/
function ajax_all_purge()
{
function ajax_all_purge() {
// no caching of results
var rand_no = Math.random();
$.ajax({
url: WWW_TOP + '/admin/ajax?action=group_edit_purge_all&rand=' + rand_no,
data : "All groups purged",
dataType : "html",
success : function(data)
{
data: 'All groups purged',
dataType: 'html',
success: function(data) {
$('div#message').html(data);
$('div#message').show('fast', function() {});
$('#grouprow-' + id).fadeTo(2000, 0.5);
$('#message').fadeOut(5000);
},
error: function(xhr,err,e) { alert( "Error in ajax_all_purge: " + err ); }
error: function(xhr, err, e) {
alert('Error in ajax_all_purge: ' + err);
},
});
}
@@ -563,22 +595,22 @@ function ajax_all_purge()
*
* @param id binary id
*/
function ajax_binaryblacklist_delete(id)
{
function ajax_binaryblacklist_delete(id) {
// no caching of results
var rand_no = Math.random();
$.ajax({
url: WWW_TOP + '/admin/ajax?action=binary_blacklist_delete&rand=' + rand_no,
data: { row_id: id },
dataType : "html",
success : function(data)
{
dataType: 'html',
success: function(data) {
$('div#message').html(data);
$('div#message').show('fast', function() {});
$('#row-' + id).fadeOut(2000);
$('#message').fadeOut(5000);
},
error: function(xhr,err,e) { alert( "Error in ajax_binaryblacklist_delete: " + err ); }
error: function(xhr, err, e) {
alert('Error in ajax_binaryblacklist_delete: ' + err);
},
});
}
@@ -587,22 +619,22 @@ function ajax_binaryblacklist_delete(id)
*
* @param id binary id
*/
function ajax_category_regex_delete(id)
{
function ajax_category_regex_delete(id) {
// no caching of results
var rand_no = Math.random();
$.ajax({
url: WWW_TOP + '/admin/ajax?action=category_regex_delete&rand=' + rand_no,
data: { row_id: id },
dataType : "html",
success : function(data)
{
dataType: 'html',
success: function(data) {
$('div#message').html(data);
$('div#message').show('fast', function() {});
$('#row-' + id).fadeOut(2000);
$('#message').fadeOut(5000);
},
error: function(xhr,err,e) { alert( "Error in ajax_category_regex_delete: " + err ); }
error: function(xhr, err, e) {
alert('Error in ajax_category_regex_delete: ' + err);
},
});
}
@@ -611,22 +643,22 @@ function ajax_category_regex_delete(id)
*
* @param id binary id
*/
function ajax_collection_regex_delete(id)
{
function ajax_collection_regex_delete(id) {
// no caching of results
var rand_no = Math.random();
$.ajax({
url: WWW_TOP + '/admin/ajax?action=collection_regex_delete&rand=' + rand_no,
data: { row_id: id },
dataType : "html",
success : function(data)
{
dataType: 'html',
success: function(data) {
$('div#message').html(data);
$('div#message').show('fast', function() {});
$('#row-' + id).fadeOut(2000);
$('#message').fadeOut(5000);
},
error: function(xhr,err,e) { alert( "Error in ajax_collection_regex_delete: " + err ); }
error: function(xhr, err, e) {
alert('Error in ajax_collection_regex_delete: ' + err);
},
});
}
@@ -635,48 +667,47 @@ function ajax_collection_regex_delete(id)
*
* @param id binary id
*/
function ajax_release_naming_regex_delete(id)
{
function ajax_release_naming_regex_delete(id) {
// no caching of results
var rand_no = Math.random();
$.ajax({
url: WWW_TOP + '/admin/ajax?action=release_naming_regex_delete&rand=' + rand_no,
data: { row_id: id },
dataType : "html",
success : function(data)
{
dataType: 'html',
success: function(data) {
$('div#message').html(data);
$('div#message').show('fast', function() {});
$('#row-' + id).fadeOut(2000);
$('#message').fadeOut(5000);
},
error: function(xhr,err,e) { alert( "Error in ajax_release_naming_regex_delete: " + err ); }
error: function(xhr, err, e) {
alert('Error in ajax_release_naming_regex_delete: ' + err);
},
});
}
jQuery(function($) {
$('#regexGroupSelect').change(function() {
document.location="?group=" + $("#regexGroupSelect option:selected").attr('value');
document.location = '?group=' + $('#regexGroupSelect option:selected').attr('value');
});
// misc
$('.confirm_action').click(function(){ return confirm('Are you sure?'); });
$('.confirm_action').click(function() {
return confirm('Are you sure?');
});
});
//enable Custom checkboxes for fix crap releases
function enableFixCrapCustom() {
var inputs = document.getElementsByName('fix_crap_opt');
if (inputs[2].checked == true) {
var checks = document.getElementsByName('fix_crap[]')
var checks = document.getElementsByName('fix_crap[]');
for (var t = 0; t < checks.length; t++) {
checks[t].disabled = false;
checks[t].readonly = false;
}
}
else {
var checks = document.getElementsByName('fix_crap[]')
} else {
var checks = document.getElementsByName('fix_crap[]');
for (var t = 0; t < checks.length; t++) {
checks[t].disabled = true;
checks[t].readonly = true;
@@ -687,54 +718,57 @@ function enableFixCrapCustom(){
/** ****** tinyMCE ***************************/
tinyMCE.init({
selector: 'textarea#body',
theme : "modern",
theme: 'modern',
plugins: [
'advlist autolink link image lists charmap print preview hr anchor pagebreak spellchecker',
'searchreplace wordcount visualblocks visualchars code fullscreen insertdatetime media nonbreaking',
'save table contextmenu directionality emoticons template paste textcolor code'
'save table contextmenu directionality emoticons template paste textcolor code',
],
theme_advanced_toolbar_location : "top",
theme_advanced_toolbar_align : "left",
toolbar: 'insertfile undo redo | styleselect | fontselect |sizeselect | fontsizeselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image | print preview media fullpage | forecolor backcolor emoticons | code',
fontsize_formats: "8pt 9pt 10pt 11pt 12pt 13pt 14pt 15pt 16pt 17pt 18pt 24pt 36pt",
mode : "exact",
theme_advanced_toolbar_location: 'top',
theme_advanced_toolbar_align: 'left',
toolbar:
'insertfile undo redo | styleselect | fontselect |sizeselect | fontsizeselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image | print preview media fullpage | forecolor backcolor emoticons | code',
fontsize_formats: '8pt 9pt 10pt 11pt 12pt 13pt 14pt 15pt 16pt 17pt 18pt 24pt 36pt',
mode: 'exact',
relative_urls: false,
remove_script_host: false,
convert_urls : true
convert_urls: true,
});
tinyMCE.init({
selector: 'textarea#metadescription',
theme : "modern",
theme: 'modern',
plugins: [
'advlist autolink link image lists charmap print preview hr anchor pagebreak spellchecker',
'searchreplace wordcount visualblocks visualchars code fullscreen insertdatetime media nonbreaking',
'save table contextmenu directionality emoticons template paste textcolor code'
'save table contextmenu directionality emoticons template paste textcolor code',
],
theme_advanced_toolbar_location : "top",
theme_advanced_toolbar_align : "left",
toolbar: 'insertfile undo redo | styleselect | fontselect |sizeselect | fontsizeselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image | print preview media fullpage | forecolor backcolor emoticons | code',
fontsize_formats: "8pt 9pt 10pt 11pt 12pt 13pt 14pt 15pt 16pt 17pt 18pt 24pt 36pt",
mode : "exact",
theme_advanced_toolbar_location: 'top',
theme_advanced_toolbar_align: 'left',
toolbar:
'insertfile undo redo | styleselect | fontselect |sizeselect | fontsizeselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image | print preview media fullpage | forecolor backcolor emoticons | code',
fontsize_formats: '8pt 9pt 10pt 11pt 12pt 13pt 14pt 15pt 16pt 17pt 18pt 24pt 36pt',
mode: 'exact',
relative_urls: false,
remove_script_host: false,
convert_urls : true
convert_urls: true,
});
tinyMCE.init({
selector: 'textarea#metakeywords',
theme : "modern",
theme: 'modern',
plugins: [
'advlist autolink link image lists charmap print preview hr anchor pagebreak spellchecker',
'searchreplace wordcount visualblocks visualchars code fullscreen insertdatetime media nonbreaking',
'save table contextmenu directionality emoticons template paste textcolor code'
'save table contextmenu directionality emoticons template paste textcolor code',
],
theme_advanced_toolbar_location : "top",
theme_advanced_toolbar_align : "left",
toolbar: 'insertfile undo redo | styleselect | fontselect |sizeselect | fontsizeselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image | print preview media fullpage | forecolor backcolor emoticons | code',
fontsize_formats: "8pt 9pt 10pt 11pt 12pt 13pt 14pt 15pt 16pt 17pt 18pt 24pt 36pt",
mode : "exact",
theme_advanced_toolbar_location: 'top',
theme_advanced_toolbar_align: 'left',
toolbar:
'insertfile undo redo | styleselect | fontselect |sizeselect | fontsizeselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image | print preview media fullpage | forecolor backcolor emoticons | code',
fontsize_formats: '8pt 9pt 10pt 11pt 12pt 13pt 14pt 15pt 16pt 17pt 18pt 24pt 36pt',
mode: 'exact',
relative_urls: false,
remove_script_host: false,
convert_urls : true
convert_urls: true,
});