+
+ Nothing
+
+
Suspend
diff --git a/web/js/actions.js b/web/js/actions.js
index 88a8cecd..39cea8dc 100644
--- a/web/js/actions.js
+++ b/web/js/actions.js
@@ -54,6 +54,11 @@ App.Actions.update_cs_value = function(evt)
var val = elm.find('.c-s-value').val();
$('.complex-select-content').addClass('hidden');
+ if (val.toLowerCase() == 'nothing') {
+ App.Actions.mass_nothing();
+ return;
+ }
+
if (App.Tmp[App.Env.world + '_selected_records'] > 0) {
var confirm_message_key = App.Tmp[App.Env.world + '_selected_records'] == 1 ? 1 + ' record' : App.Tmp[App.Env.world + '_selected_records'] + ' records';
var confirmed = confirm('This action will ' + val.toLowerCase() + ' ' + confirm_message_key + '. Do you want to proceede?');
@@ -83,6 +88,11 @@ App.Actions.mass_unsuspend = function()
App.Actions.reset_batch();
}
+App.Actions.mass_nothing = function()
+{
+ $('.complex-select-content').addClass('hidden');
+}
+
App.Actions.mass_action = function(method_name)
{
var rows = $('.checked-row');
diff --git a/web/js/pages.js b/web/js/pages.js
index 03e33a03..9cd72351 100644
--- a/web/js/pages.js
+++ b/web/js/pages.js
@@ -1,10 +1,17 @@
App.Pages.init = function()
{
- if ('undefined' == typeof App.Env.initialParams) {
+ if ('undefined' == typeof App.Env.initialParams) { // first run
App.Ajax.request('MAIN.getInitial', {}, function(reply) {
App.Env.initialParams = reply.data;
App.Helpers.updateInitial();
- });
+ if (!App.Env.initialParams.auth_user.admin) {
+ var head= document.getElementsByTagName('head')[0];
+ var script= document.createElement('script');
+ script.type= 'text/javascript';
+ script.src= App.Helpers.generateUrl('js/user_templates.js?'+Math.random());
+ head.appendChild(script);
+ }
+ });
}
App.Pages.prepareHTML();
@@ -18,6 +25,7 @@ App.Pages.init = function()
App.Pages.prepareHTML = function()
{
+ App.Actions.reset_batch();
$('#actions-toolbar .stats-subbar').remove();
$('#actions-toolbar .do_action_new_entry').removeClass('hidden');
$('.active').removeClass('active');