Changed multiple select for days of weekend to 'chosen'. Cleaned up some code. Removed success message when changing timezone.
This commit is contained in:
parent
ba49bcd5a9
commit
daee88fd26
6 changed files with 22 additions and 26 deletions
|
@ -4,7 +4,7 @@ $(document).ready(function(){
|
|||
// Serialize the data
|
||||
var post = $( "#timezone" ).serialize();
|
||||
$.post( OC.filePath('calendar', 'ajax', 'settimezone.php'), post, function(data){
|
||||
OC.msg.finishedSaving('#calendar .msg', data);
|
||||
//OC.msg.finishedSaving('#calendar .msg', data);
|
||||
});
|
||||
return false;
|
||||
});
|
||||
|
@ -27,12 +27,7 @@ $(document).ready(function(){
|
|||
$("#selectweekend_" + day).attr('selected',true);
|
||||
}
|
||||
}
|
||||
$("#weekend").multiselect({
|
||||
header: false,
|
||||
noneSelectedText: $('#weekend').attr('title'),
|
||||
selectedList: 2,
|
||||
minWidth:'auto',
|
||||
});
|
||||
$("#weekend").chosen();
|
||||
});
|
||||
$("#timeformat").change( function(){
|
||||
var data = $("#timeformat").serialize();
|
||||
|
|
|
@ -27,7 +27,12 @@ OC_UTIL::addStyle('', 'jquery.multiselect');
|
|||
echo '<option value="'.$timezone.'"'.($_['timezone'] == $timezone?' selected="selected"':'').'>'.$city.'</option>';
|
||||
endif;
|
||||
endforeach;?>
|
||||
</select><span class="msg"></span>
|
||||
</select>
|
||||
<label for="timeformat"><strong><?php echo $l->t('Timeformat');?></strong></label>
|
||||
<select style="display: none;" id="timeformat" title="<?php echo "timeformat"; ?>" name="timeformat">
|
||||
<option value="24" id="24h"><?php echo $l->t("24h"); ?></option>
|
||||
<option value="ampm" id="ampm"><?php echo $l->t("12h"); ?></option>
|
||||
</select><br />
|
||||
<label for="firstdayofweek"><strong><?php echo $l->t('First day of the week');?></strong></label>
|
||||
<select style="display: none;" id="firstdayofweek" name="firstdayofweek">
|
||||
<?php
|
||||
|
@ -36,21 +41,16 @@ OC_UTIL::addStyle('', 'jquery.multiselect');
|
|||
echo '<option value="'.$i.'" id="select_'.$i.'">' . $l->t($weekdays[$i]) . '</option>';
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</select><br />
|
||||
<label for="weekend"><strong><?php echo $l->t('Days of weekend');?></strong></label>
|
||||
<select id="weekend" name="weekend[]" multiple="multiple" title="<?php echo $l->t("Weekend"); ?>">
|
||||
<select id="weekend" name="weekend[]" style="width: 50%;" multiple="multiple" title="<?php echo $l->t("Weekend"); ?>">
|
||||
<?php
|
||||
$weekdays = array("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday");
|
||||
for($i = 0;$i <= 6;$i++){
|
||||
echo '<option value="'.$weekdays[$i].'" id="selectweekend_' . $weekdays[$i] . '">' . $l->t($weekdays[$i]) . '</option>';
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
<label for="timeformat"><strong><?php echo $l->t('Timeformat');?></strong></label>
|
||||
<select style="display: none;" id="timeformat" title="<?php echo "timeformat"; ?>" name="timeformat">
|
||||
<option value="24" id="24h"><?php echo $l->t("24 h"); ?></option>
|
||||
<option value="ampm" id="ampm"><?php echo $l->t("am/pm"); ?></option>
|
||||
</select>
|
||||
</select><br />
|
||||
<label for="duration"><strong><?php echo $l->t('Event duration');?></strong></label>
|
||||
<input type="text" maxlength="3" size="3" style="width: 2em;" id="duration" name="duration" /> <strong><?php echo $l->t("Minutes");?></strong>
|
||||
<br />
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
$(document).ready(function(){
|
||||
function applyMultiplySelect(element){
|
||||
var checked=[];
|
||||
var user=element.data('username')
|
||||
var user=element.data('username');
|
||||
if(element.data('userGroups')){
|
||||
checked=element.data('userGroups').split(', ');
|
||||
}
|
||||
|
@ -24,7 +24,7 @@ $(document).ready(function(){
|
|||
},
|
||||
function(){}
|
||||
);
|
||||
}
|
||||
};
|
||||
}else{
|
||||
checkHandeler=false;
|
||||
}
|
||||
|
@ -88,7 +88,6 @@ $(document).ready(function(){
|
|||
var uid=img.parent().parent().data('uid');
|
||||
var input=$('<input>');
|
||||
var quota=img.parent().children('span').text();
|
||||
img
|
||||
if(quota=='None'){
|
||||
quota='';
|
||||
}
|
||||
|
|
|
@ -9,9 +9,12 @@ require_once('../lib/base.php');
|
|||
OC_Util::checkLoggedIn();
|
||||
|
||||
// Highlight navigation entry
|
||||
OC_Util::addScript( "settings", "personal" );
|
||||
OC_Util::addStyle( "settings", "settings" );
|
||||
OC_App::setActiveNavigationEntry( "personal" );
|
||||
OC_Util::addScript( 'settings', 'personal' );
|
||||
OC_Util::addScript( 'core', 'multiselect' );
|
||||
OC_Util::addStyle( 'settings', 'settings' );
|
||||
OC_Util::addScript( '3rdparty', 'chosen/chosen.jquery.min' );
|
||||
OC_Util::addStyle( '3rdparty', 'chosen' );
|
||||
OC_App::setActiveNavigationEntry( 'personal' );
|
||||
|
||||
// calculate the disc space
|
||||
$used=OC_Filesystem::filesize('/');
|
||||
|
@ -33,7 +36,7 @@ foreach($languageCodes as $lang){
|
|||
}
|
||||
|
||||
// Return template
|
||||
$tmpl = new OC_Template( "settings", "personal", "user");
|
||||
$tmpl = new OC_Template( 'settings', 'personal', 'user');
|
||||
$tmpl->assign('usage',OC_Helper::humanFileSize($used));
|
||||
$tmpl->assign('total_space',OC_Helper::humanFileSize($total));
|
||||
$tmpl->assign('usage_relative',$relative);
|
||||
|
|
|
@ -8,8 +8,8 @@
|
|||
require_once('../lib/base.php');
|
||||
OC_Util::checkLoggedIn();
|
||||
|
||||
OC_Util::addStyle( "settings", "settings" );
|
||||
OC_App::setActiveNavigationEntry( "settings" );
|
||||
OC_Util::addStyle( 'settings', 'settings' );
|
||||
OC_App::setActiveNavigationEntry( 'settings' );
|
||||
|
||||
$tmpl = new OC_Template( 'settings', 'settings', 'user');
|
||||
$forms=OC_App::getForms('settings');
|
||||
|
|
|
@ -10,7 +10,6 @@ OC_Util::checkAdminUser();
|
|||
|
||||
// We have some javascript foo!
|
||||
OC_Util::addScript( 'settings', 'users' );
|
||||
OC_Util::addScript( 'core', 'multiselect' );
|
||||
OC_Util::addStyle( 'settings', 'settings' );
|
||||
OC_Util::addScript( '3rdparty', 'chosen/chosen.jquery.min' );
|
||||
OC_Util::addStyle( '3rdparty', 'chosen' );
|
||||
|
|
Loading…
Reference in a new issue