Merge branch 'stable4' of gitorious.org:owncloud/owncloud into stable4

This commit is contained in:
Lukas Reschke 2012-07-02 10:22:33 +02:00
commit 4235ce0b63
4 changed files with 26 additions and 6 deletions

View File

@ -360,7 +360,8 @@ $(document).ready(function() {
$(this).select();
});
$('#emailPrivateLink').live('submit', function() {
$('#emailPrivateLink').live('submit', function(event) {
event.preventDefault();
OC.Share.emailPrivateLink();
});
});

View File

@ -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 selected="selected"/>');
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());
}
}
});

View File

@ -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;
}

View File

@ -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('<option value="'+group+'">'+group+'</option>');
}
})
};
element.multiSelect({
createCallback:addGroup,
createText:'add group',
checked:checked,
oncheck:checkHandeler,
@ -213,6 +221,5 @@ $(document).ready(function(){
}
}
);
location.reload();
});
});