From fca2d45bb2fd946c200b7efa85730c17ee07ccb2 Mon Sep 17 00:00:00 2001 From: nuxsmin Date: Fri, 8 Nov 2013 23:01:21 +0100 Subject: [PATCH] Show warning image when adding/removing files extensions or wiki filters. --- inc/tpl/config.php | 41 +++++++++++++++++++++++++---------------- js/functions.php | 6 ++---- 2 files changed, 27 insertions(+), 20 deletions(-) diff --git a/inc/tpl/config.php b/inc/tpl/config.php index 7c880203..23784167 100644 --- a/inc/tpl/config.php +++ b/inc/tpl/config.php @@ -217,18 +217,6 @@ $allowedExts = SP_Config::getValue('allowed_exts'); - - '.$filter.''; -// } -// } - ?> - @@ -391,8 +379,19 @@ $allowedExts = SP_Config::getValue('allowed_exts'); // Fix scrolling to bottom var $tagsbox = $(this).next(); $tagsbox.animate({scrollTop: $tagsbox.height()}); + + if ( $tagsbox.find('img:last').attr('alt') != 'warning' ){ + $tagsbox.find('div:last').prev().append('warning'); + } }, - 'onRemoveTag' : function(){ + 'onRemoveTag' : function(){ + var $tagsbox = $(this).next(); + + if ( $tagsbox.find('img:last').attr('alt') != 'warning' ){ + $tagsbox.find('div:last').prev().append('warning'); + } + }, + onChange : function(){ // Fix tooltip on refresh the tags list $(this + '[title]').powerTip(powertipOptions); } @@ -407,15 +406,25 @@ $allowedExts = SP_Config::getValue('allowed_exts'); // Fix scrolling to bottom var $tagsbox = $(this).next(); $tagsbox.animate({scrollTop: $tagsbox.height()}); + + if ( $tagsbox.find('img:last').attr('alt') != 'warning' ){ + $tagsbox.find('div:last').prev().append('warning'); + } }, onRemoveTag : function(){ - // Fix tooltip on refresh the tags list - $(this + '[title]').powerTip(powertipOptions); + var $tagsbox = $(this).next(); + + if ( $tagsbox.find('img:last').attr('alt') != 'warning' ){ + $tagsbox.find('div:last').prev().append('warning'); + } }, onChange : function(){ var $tagsbox = $(this).next(); last_width = $tagsbox.find("span:last").width() + 10; - $tagsbox.find(".tag:last").css('width', last_width); + $tagsbox.find(".tag:last").css('width', last_width); + + // Fix tooltip on refresh the tags list + $(this + '[title]').powerTip(powertipOptions); } }); \ No newline at end of file diff --git a/js/functions.php b/js/functions.php index df7c760b..5c9ad885 100644 --- a/js/functions.php +++ b/js/functions.php @@ -48,8 +48,7 @@ $locale= array( 'Valor no introducido', 'Valor duplicado', 'Opción no seleccionada', - 'Opción añadida
Guarde la configuración para que sea efectiva', - 'Opción eliminada
Guarde la configuración para que sea efectiva', + 'Guarde la configuración para que sea efectiva', 'Clave Generada', 'Nivel alto', 'Nivel medio', @@ -78,8 +77,7 @@ $locale= array( 'Value not entered', 'Duplicated value', 'Option not selected', - 'Option added
You should save configuration in order to take effect', - 'Option deleted
You should save configuration in order to take effect', + 'You should save configuration in order to take effect', 'Generated Password', 'High level', 'Average level',