]> source.dussan.org Git - nextcloud-server.git/commitdiff
Changed multiple select for days of weekend to 'chosen'. Cleaned up some code. Remove...
authorMarvin Thomas Rabe <m.rabe@echtzeitraum.de>
Sun, 2 Oct 2011 13:51:24 +0000 (15:51 +0200)
committerMarvin Thomas Rabe <m.rabe@echtzeitraum.de>
Sun, 2 Oct 2011 13:51:24 +0000 (15:51 +0200)
apps/calendar/js/settings.js
apps/calendar/templates/settings.php
settings/js/users.js
settings/personal.php
settings/settings.php
settings/users.php

index 07e912aaa7aea3240b499839dc44259ceb4ac33f..6c00be06b3928ee9b61de301b9e89dcc385a806d 100644 (file)
@@ -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();
index 75f094aab47bce3e2fe245b86bd0b16641e5ff9a..144a05059ca4b2465c546bf2b82ec514b49bc411 100644 (file)
@@ -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>&nbsp;&nbsp;
+                </select>&nbsp;&nbsp;
+               <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>&nbsp;&nbsp;
+               </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>&nbsp;&nbsp;
-               <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>&nbsp;&nbsp;
+               </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 />
index c60fb32c40e7fbf9eb267f49d1e76b9e0f582213..4944f3a62f643c0a52db66d45ef36ba587ccbff5 100644 (file)
@@ -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='';
                }
index 687b1a7aa348e53c0f5674b5e77d6a2289399fd6..0e15f176f980a9d1a25447f52a9c95a3a51f3002 100644 (file)
@@ -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);
index b08cb08db09b10a596a7b81833f218f28ba3d6e0..a49de85520bf5ef6302427cf3a87e0cf26001f43 100644 (file)
@@ -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');
index 08d6c53840f743707486f820689aabad92137c14..9ca2cb369f7e1d4ad61e639f7996d22e8484b54d 100644 (file)
@@ -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' );