Răsfoiți Sursa

Merge pull request #128 from causefx/develop

Fix Setup Bug - Minor CSS changes
causefx 9 ani în urmă
părinte
comite
2973d4262e
11 a modificat fișierele cu 165 adăugiri și 19 ștergeri
  1. 1 0
      css/style.css
  2. 33 10
      index.php
  3. 3 1
      lang/de.ini
  4. 3 1
      lang/en.ini
  5. 3 1
      lang/es.ini
  6. 3 1
      lang/fr.ini
  7. 3 1
      lang/it.ini
  8. 3 1
      lang/nl.ini
  9. 2 0
      robots.txt
  10. 105 3
      settings.php
  11. 6 0
      user.php

+ 1 - 0
css/style.css

@@ -3462,6 +3462,7 @@ ul.inbox-pagination li {
 
 .ns-effect-bouncyflip p {
   padding: 0.5em 0.8em 0.8em 3.5em;
+  padding-left: 0px !important;    
 }
 
 .ns-effect-bouncyflip .ns-close::after,

+ 33 - 10
index.php

@@ -252,11 +252,34 @@ else :
     endif;
 
     $userpic = md5( strtolower( trim( $USER->email ) ) );
-    if(LOADINGICON !== "") : $loadingIcon = LOADINGICON; endif;
+    if(LOADINGICON !== "") : 
+
+        $loadingIcon = LOADINGICON; 
+
+    endif;
+
+    if(SLIMBAR == "true") : $slimBar = "30"; $userSize = "25"; else : $slimBar = "56"; $userSize = "40"; endif;
+    
+    if($USER->authenticated) : 
+
+        $showPic = "<img src='https://www.gravatar.com/avatar/$userpic?s=$userSize' class='img-circle'>"; 
+
+    else : 
+
+        $showPic = "<img style='height: " . $userSize . "px'; src='images/login.png'>"; 
+
+    endif;
 
 endif;
+
 if(!defined('SLIMBAR')) : define('SLIMBAR', 'false'); endif;
 if(!defined('LOADINGSCREEN')) : define('LOADINGSCREEN', 'true'); endif;
+if(!isset($notifyExplode)) :
+
+    $notifyExplode = array("bar","slidetop");
+
+endif;
+
 
 if(SLIMBAR == "true") : $slimBar = "30"; $userSize = "25"; else : $slimBar = "56"; $userSize = "40"; endif;
 
@@ -759,7 +782,7 @@ if(SLIMBAR == "true") : $slimBar = "30"; $userSize = "25"; else : $slimBar = "56
                             
                             <a class="show-members">
                                 
-                            <?php endif; endif; if($USER->authenticated) : $showPic = "<img src='https://www.gravatar.com/avatar/$userpic?s=$userSize' class='img-circle'>"; else : $showPic = "<img style='height: " . $userSize . "px'; src='images/login.png'>"; endif;?>
+                            <?php endif; endif;?>
                                 
                                 <i class="userpic"><?=$showPic;?></i> 
                                 
@@ -807,7 +830,7 @@ if(SLIMBAR == "true") : $slimBar = "30"; $userSize = "25"; else : $slimBar = "56
 
                 <!--Load Framed Content-->
                 <?php if($needSetup == "Yes" && $configReady == "Yes") : ?>
-                <div class="table-wrapper">
+                <div class="table-wrapper" style="background:<?=$sidebar;?>;">
 
                     <div class="table-row">
 
@@ -817,9 +840,9 @@ if(SLIMBAR == "true") : $slimBar = "30"; $userSize = "25"; else : $slimBar = "56
 
                                 <div class="content-box">
 
-                                    <div class="green-bg biggest-box">
+                                    <div class="biggest-box" style="background:<?=$topbar;?>;">
 
-                                        <h1 class="zero-m text-uppercase"><?php echo $language->translate("CREATE_ADMIN");?></h1>
+                                        <h1 class="zero-m text-uppercase" style="color:<?=$topbartext;?>;"><?php echo $language->translate("CREATE_ADMIN");?></h1>
 
                                     </div>
 
@@ -857,7 +880,7 @@ if(SLIMBAR == "true") : $slimBar = "30"; $userSize = "25"; else : $slimBar = "56
 
                                             </div>
 
-                                            <button id="registerSubmit" type="submit" class="btn green-bg btn-block btn-warning text-uppercase waves waves-effect waves-float" value="Register"><?php echo $language->translate("REGISTER");?></button>
+                                            <button id="registerSubmit" style="background:<?=$topbar;?>;" type="submit" class="btn btn-block text-uppercase waves waves-effect waves-float" value="Register"><text style="color:<?=$topbartext;?>;"><?php echo $language->translate("REGISTER");?></text></button>
 
                                         </form>
 
@@ -876,7 +899,7 @@ if(SLIMBAR == "true") : $slimBar = "30"; $userSize = "25"; else : $slimBar = "56
                 
                 
                 <?php if($needSetup == "Yes" && $configReady == "No") : ?>
-                <div class="table-wrapper">
+                <div class="table-wrapper" style="background:<?=$sidebar;?>;">
 
                     <div class="table-row">
 
@@ -886,9 +909,9 @@ if(SLIMBAR == "true") : $slimBar = "30"; $userSize = "25"; else : $slimBar = "56
 
                                 <div class="content-box">
 
-                                    <div class="green-bg biggest-box">
+                                    <div class="biggest-box" style="background:<?=$topbar;?>;">
 
-                                        <h1 class="zero-m text-uppercase"><?php echo $language->translate("DATABASE_PATH");?></h1>
+                                        <h1 class="zero-m text-uppercase" style="color:<?=$topbartext;?>;"><?php echo $language->translate("DATABASE_PATH");?></h1>
 
                                     </div>
 
@@ -923,7 +946,7 @@ if(SLIMBAR == "true") : $slimBar = "30"; $userSize = "25"; else : $slimBar = "56
 
                                             </div>
 
-                                            <button id="databaseLocationSubmit" type="submit" class="btn green-bg btn-block btn-sm text-uppercase waves waves-effect waves-float" value="Save Location"><?php echo $language->translate("SAVE_LOCATION");?></button>
+                                            <button style="background:<?=$topbar;?>;" id="databaseLocationSubmit" type="submit" class="btn btn-block btn-sm text-uppercase waves waves-effect waves-float" value="Save Location"><text style="color:<?=$topbartext;?>;"><?php echo $language->translate("SAVE_LOCATION");?></text></button>
 
                                         </form>
 

+ 3 - 1
lang/de.ini

@@ -163,4 +163,6 @@ ENABLE_SLIMBAR = "Schmale Titelleiste aktivieren"
 UPDATE_COMPLETE = "Organizer Version & Database Have Been Upgraded!"
 ICON_COPY = "Icon Path Copied To Clipboard"
 TEST_MESSAGE = "This is a test message"
-TEST = "Test"
+TEST = "Test"
+SHOW_MORE = "Show More"
+SHOW_LESS = "Show Less"

+ 3 - 1
lang/en.ini

@@ -163,4 +163,6 @@ ENABLE_SLIMBAR = "Enable Slim Bar"
 UPDATE_COMPLETE = "Organizer Version & Database Have Been Upgraded!"
 ICON_COPY = "Icon Path Copied To Clipboard"
 TEST_MESSAGE = "This is a test message"
-TEST = "Test"
+TEST = "Test"
+SHOW_MORE = "Show More"
+SHOW_LESS = "Show Less"

+ 3 - 1
lang/es.ini

@@ -163,4 +163,6 @@ ENABLE_SLIMBAR = "Enable Slim Bar"
 UPDATE_COMPLETE = "Organizer Version & Database Have Been Upgraded!"
 ICON_COPY = "Icon Path Copied To Clipboard"
 TEST_MESSAGE = "This is a test message"
-TEST = "Test"
+TEST = "Test"
+SHOW_MORE = "Show More"
+SHOW_LESS = "Show Less"

+ 3 - 1
lang/fr.ini

@@ -163,4 +163,6 @@ ENABLE_SLIMBAR = "Enable Slim Bar"
 UPDATE_COMPLETE = "Organizer Version & Database Have Been Upgraded!"
 ICON_COPY = "Icon Path Copied To Clipboard"
 TEST_MESSAGE = "This is a test message"
-TEST = "Test"
+TEST = "Test"
+SHOW_MORE = "Show More"
+SHOW_LESS = "Show Less"

+ 3 - 1
lang/it.ini

@@ -163,4 +163,6 @@ ENABLE_SLIMBAR = "Enable Slim Bar"
 UPDATE_COMPLETE = "Organizer Version & Database Have Been Upgraded!"
 ICON_COPY = "Icon Path Copied To Clipboard"
 TEST_MESSAGE = "This is a test message"
-TEST = "Test"
+TEST = "Test"
+SHOW_MORE = "Show More"
+SHOW_LESS = "Show Less"

+ 3 - 1
lang/nl.ini

@@ -163,4 +163,6 @@ ENABLE_SLIMBAR = "Enable Slim Bar"
 UPDATE_COMPLETE = "Organizer Version & Database Have Been Upgraded!"
 ICON_COPY = "Icon Path Copied To Clipboard"
 TEST_MESSAGE = "This is a test message"
-TEST = "Test"
+TEST = "Test"
+SHOW_MORE = "Show More"
+SHOW_LESS = "Show Less"

+ 2 - 0
robots.txt

@@ -0,0 +1,2 @@
+User-agent: *
+Disallow: /

+ 105 - 3
settings.php

@@ -89,6 +89,59 @@ function get_browser_name() {
     
 }
 
+function getTimezone(){
+
+    $regions = array(
+        'Africa' => DateTimeZone::AFRICA,
+        'America' => DateTimeZone::AMERICA,
+        'Antarctica' => DateTimeZone::ANTARCTICA,
+        'Asia' => DateTimeZone::ASIA,
+        'Atlantic' => DateTimeZone::ATLANTIC,
+        'Europe' => DateTimeZone::EUROPE,
+        'Indian' => DateTimeZone::INDIAN,
+        'Pacific' => DateTimeZone::PACIFIC
+    );
+    
+    $timezones = array();
+
+    foreach ($regions as $name => $mask) {
+        
+        $zones = DateTimeZone::listIdentifiers($mask);
+
+        foreach($zones as $timezone) {
+
+            $time = new DateTime(NULL, new DateTimeZone($timezone));
+
+            $ampm = $time->format('H') > 12 ? ' ('. $time->format('g:i a'). ')' : '';
+
+            $timezones[$name][$timezone] = substr($timezone, strlen($name) + 1) . ' - ' . $time->format('H:i') . $ampm;
+
+        }
+        
+    }   
+    
+    print '<select name="timezone" id="timezone" class="form-control material input-sm" required>';
+    
+    foreach($timezones as $region => $list) {
+    
+        print '<optgroup label="' . $region . '">' . "\n";
+    
+        foreach($list as $timezone => $name) {
+            
+            if($timezone == TIMEZONE) : $selected = " selected"; else : $selected = ""; endif;
+            
+            print '<option value="' . $timezone . '"' . $selected . '>' . $name . '</option>' . "\n";
+    
+        }
+    
+        print '</optgroup>' . "\n";
+    
+    }
+    
+    print '</select>';
+    
+}
+
 $dbfile = DATABASE_LOCATION  . constant('User::DATABASE_NAME') . ".db";
 $databaseLocation = "databaseLocation.ini.php";
 $userdirpath = USER_HOME;
@@ -1180,7 +1233,7 @@ endif;
 
                                                     <div class="form-group">
 
-                                                        <input type="text" class="form-control material input-sm" name="timezone" placeholder="<?php echo $language->translate("SET_TIMEZONE");?>" value="<?php echo TIMEZONE;?>">
+                                                        <?php echo getTimezone();?>
                                                         <p class="help-text"><?php echo $language->translate("SET_TIMEZONE");?></p>
 
                                                     </div>
@@ -1735,6 +1788,22 @@ endif;
                                                     
                                                 </ul>
                                                 
+                                                <div class="btn-group-sm btn-group btn-group-justified">
+                                                    
+                                                    <div id="loadMore" class="btn-group" role="group">
+                                                    
+                                                        <button type="button" class="btn waves btn-primary waves-effect waves-float text-uppercase"><?php echo $language->translate("SHOW_MORE");?></button>
+                                                    
+                                                    </div>
+                                                    
+                                                    <div id="showLess" class="btn-group" role="group">
+                                                        
+                                                        <button type="button" class="btn waves btn-warning waves-effect waves-float text-uppercase"><?php echo $language->translate("SHOW_LESS");?></button>
+                                                        
+                                                    </div>
+                                                    
+                                                </div>
+                                                
                                             </div>
                                             
                                         </div>
@@ -2287,7 +2356,34 @@ endif;
      
             });
             
+            $('#showLess').hide();
+            
+            $('#loadMore').click(function () {
+                            
+                x= (x+5 <= size_li) ? x+5 : size_li;
 
+                $('#versionHistory li:lt('+x+')').show();
+                
+                $('#showLess').show();
+                
+                if(x == size_li){
+                    
+                    $('#loadMore').hide();
+                    
+                }
+
+            });
+
+            $('#showLess').click(function () {
+
+                $('#versionHistory li').not(':lt(2)').hide();
+                
+                $('#loadMore').show();
+                    
+                $('#showLess').hide();
+
+            });
+            
             $('.icp-auto').iconpicker({placement: 'left', hideOnSelect: false, collision: true});
             
             $("li[class^='list-group-item']").bind('mouseheld', function(e) {
@@ -2568,7 +2664,7 @@ endif;
                 dataType: "json",
                 success: function(github) {
                     
-                    var currentVersion = "0.99997";
+                    var currentVersion = "0.99998";
                    
                     infoTabVersion = $('#about').find('#version');
                     infoTabVersionHistory = $('#about').find('#versionHistory');
@@ -2585,8 +2681,14 @@ endif;
                                    
                         }
                         
-                        $(infoTabVersionHistory).append('<li><time class="cbp_tmtime" datetime="' + v.published_at + '"><span>' + v.published_at.substring(0,10) + '</span> <span class="label label-default">' + v.tag_name + '</span></time><div class="cbp_tmicon cbp_tmicon-earth animated jello"></div><div class="cbp_tmlabel"><h2 class="text-uppercase">' + v.name + '</h2><p>' + v.body + '</p></div></li>');
+                        $(infoTabVersionHistory).append('<li style="display: none"><time class="cbp_tmtime" datetime="' + v.published_at + '"><span>' + v.published_at.substring(0,10) + '</span> <span>' + v.tag_name + '</span></time><div class="cbp_tmicon cbp_tmicon-earth animated jello"></div><div class="cbp_tmlabel"><h2 class="text-uppercase">' + v.name + '</h2><p>' + v.body + '</p></div></li>');
                         
+                        size_li = $("#versionHistory li").size();
+                        
+                        x=2;
+                        
+                        $('#versionHistory li:lt('+x+')').show();
+                                                
                     });
                             
         			if(currentVersion < githubVersion){

+ 6 - 0
user.php

@@ -432,6 +432,12 @@ EOT;
 		{
 			$_SESSION["username"] = User::GUEST_USER;
 			$_SESSION["token"] = -1;
+            unset($_COOKIE['Organizr']);
+            setcookie('Organizr', '', time() - 3600, '/');
+            unset($_COOKIE['OrganizrU']);
+            setcookie('OrganizrU', '', time() - 3600, '/');
+            unset($_COOKIE['cookiePassword']);
+            setcookie("cookiePassword", '', time() - 3600, '/');
 		}
 
 		/**