diff --git a/apps/files_sharing/js/share.js b/apps/files_sharing/js/share.js
index 96c9017dbf..afe31a75d0 100644
--- a/apps/files_sharing/js/share.js
+++ b/apps/files_sharing/js/share.js
@@ -360,7 +360,8 @@ $(document).ready(function() {
$(this).select();
});
- $('#emailPrivateLink').live('submit', function() {
+ $('#emailPrivateLink').live('submit', function(event) {
+ event.preventDefault();
OC.Share.emailPrivateLink();
});
});
\ No newline at end of file
diff --git a/core/js/multiselect.js b/core/js/multiselect.js
index db5afa637c..c4fd74b047 100644
--- a/core/js/multiselect.js
+++ b/core/js/multiselect.js
@@ -35,6 +35,7 @@
}
button.click(function(event){
+
var button=$(this);
if(button.parent().children('ul').length>0){
button.parent().children('ul').slideUp(400,function(){
@@ -128,19 +129,30 @@
if(event.keyCode == 13) {
event.preventDefault();
event.stopPropagation();
+ var value = $(this).val();
+ var exists = false;
+ $.each(options,function(index, item) {
+ if ($(item).val() == value) {
+ exists = true;
+ return false;
+ }
+ });
+ if (exists) {
+ return false;
+ }
var li=$(this).parent();
$(this).remove();
li.text('+ '+settings.createText);
li.before(createItem(this));
var select=button.parent().next();
var option=$('');
- option.attr('value',$(this).val());
+ option.attr('value',value);
option.text($(this).val());
- select.append(options);
+ select.append(option);
li.prev().children('input').trigger('click');
button.parent().data('preventHide',false);
if(settings.createCallback){
- settings.createCallback();
+ settings.createCallback($(this).val());
}
}
});
diff --git a/lib/l10n.php b/lib/l10n.php
index c5967109a6..de8514573d 100644
--- a/lib/l10n.php
+++ b/lib/l10n.php
@@ -115,7 +115,7 @@ class OC_L10N{
// (Just no need to define date/time format etc. twice)
if((OC_Helper::issubdirectory($i18ndir.$lang.'.php', OC_App::getAppPath($app).'/l10n/') || OC_Helper::issubdirectory($i18ndir.$lang.'.php', OC::$SERVERROOT.'/core/l10n/') || OC_Helper::issubdirectory($i18ndir.$lang.'.php', OC::$SERVERROOT.'/settings')) && file_exists($i18ndir.$lang.'.php')) {
// Include the file, save the data from $CONFIG
- include($i18ndir.$lang.'.php');
+ include(strip_tags($i18ndir).strip_tags($lang).'.php');
if(isset($TRANSLATIONS) && is_array($TRANSLATIONS)){
$this->translations = $TRANSLATIONS;
}
diff --git a/settings/js/users.js b/settings/js/users.js
index 6ee7fb04f0..784f8b888c 100644
--- a/settings/js/users.js
+++ b/settings/js/users.js
@@ -40,7 +40,15 @@ $(document).ready(function(){
}else{
checkHandeler=false;
}
+ var addGroup = function(group) {
+ $('select[multiple]').each(function(index, element) {
+ if ($(element).find('option[value="'+group +'"]').length == 0) {
+ $(element).append('');
+ }
+ })
+ };
element.multiSelect({
+ createCallback:addGroup,
createText:'add group',
checked:checked,
oncheck:checkHandeler,
@@ -213,6 +221,5 @@ $(document).ready(function(){
}
}
);
- location.reload();
});
});