Ver código fonte

Merge pull request #75 from causefx/develop

Develop
causefx 9 anos atrás
pai
commit
a74761f1f6
5 arquivos alterados com 197 adições e 13 exclusões
  1. 0 0
      bower_components/bootstrap/dist/css/bootstrap.min.css
  2. 74 11
      index.php
  3. 11 0
      js/mousetrap.min.js
  4. 110 0
      lang/nl.ini
  5. 2 2
      settings.php

Diferenças do arquivo suprimidas por serem muito extensas
+ 0 - 0
bower_components/bootstrap/dist/css/bootstrap.min.css


+ 74 - 11
index.php

@@ -60,20 +60,53 @@ function write_ini_file($content, $path) {
 }
 
 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" required>';
     
-    if (ini_get('date.timezone')) :
+    foreach($timezones as $region => $list) {
     
-        echo ini_get('date.timezone');
+        print '<optgroup label="' . $region . '">' . "\n";
     
-    elseif (date_default_timezone_get()) :
+        foreach($list as $timezone => $name) {
+            
+            print '<option value="' . $timezone . '">' . $name . '</option>' . "\n";
     
-        echo date_default_timezone_get();
+        }
     
-    else :
+        print '</optgroup>' . "\n";
     
-        echo "America/Los_Angeles";
+    }
     
-    endif;    
+    print '</select>';
     
 }
                 
@@ -461,7 +494,7 @@ endif;
                                 
                                 if($row['defaultz'] == "true") : $defaultz = "active"; else : $defaultz = ""; endif;?>
                                 
-                                <li window="<?=$row['window'];?>" class="tab-item <?=$defaultz;?>" id="<?=$row['url'];?>x" name="<?php echo strtolower($row['name']);?>">
+                                <li window="<?=$row['window'];?>" class="tab-item <?=$defaultz;?>" id="<?=$row['url'];?>x" data-title="<?=$row['name'];?>" name="<?php echo strtolower($row['name']);?>">
                                     
                                     <a class="tab-link">
                                         
@@ -486,7 +519,7 @@ endif;
                                 <?php endforeach; endif;?>
                                 
                                 <?php if($configReady == "Yes") : if($USER->authenticated && $USER->role == "admin") :?>
-                                <li class="tab-item <?=$settingsActive;?>" id="settings.phpx" name="settings">
+                                <li class="tab-item <?=$settingsActive;?>" id="settings.phpx" data-title="Settings" name="settings">
                                                             
                                     <a class="tab-link">
                                         
@@ -705,7 +738,9 @@ endif;
                                                 
                                                 <h5><?php echo $language->translate("SET_DATABASE_LOCATION");?></h5>
                                                 
-                                                <input type="text" class="form-control material" name="timezone" autofocus value="<?php echo getTimezone();?>" autocorrect="off" autocapitalize="off" required>
+                                                <!--<input type="text" class="form-control material" name="timezone" autofocus value="<?php //echo getTimezone();?>" autocorrect="off" autocapitalize="off" required>-->
+                                                
+                                                <?php echo getTimezone();?>
                                                 
                                                 <h5><?php echo $language->translate("SET_TIMEZONE");?></h5>
                                                 
@@ -1075,6 +1110,7 @@ endif;
 
         <!--Custom Scripts-->
         <script src="<?=$baseURL;?>js/common.js"></script>
+        <script src="<?=$baseURL;?>js/mousetrap.min.js"></script>
 
         <script>
 
@@ -1314,6 +1350,10 @@ endif;
         $("li[class^='tab-item']").on('click vclick', function(){
                 
             var thisidfull = $(this).attr("id");
+            
+            var thistitle = $(this).attr("data-title");
+            
+            var thisname = $(this).attr("name");
 
             var thisid = thisidfull.substr(0, thisidfull.length-1);
 
@@ -1331,6 +1371,10 @@ endif;
 
                 currentframe.attr("class", "iframe active");
                 
+                document.title = thistitle;
+                
+                window.location.href = '#' + thisname;
+                
                 setHeight();
 
                 $("li[class^='tab-item active']").attr("class", "tab-item");
@@ -1352,6 +1396,10 @@ endif;
                     $("div[class^='iframe active']").attr("class", "iframe hidden");
 
                     $( '<div class="iframe active" data-content-url="'+thisid+'"><iframe scrolling="auto" sandbox="allow-forms allow-same-origin allow-pointer-lock allow-scripts allow-popups allow-modals" allowfullscreen="true" webkitallowfullscreen="true" frameborder="0" style="width:100%; height:100%;" src="'+thisid+'"></iframe></div>' ).appendTo( "#content" );
+                    
+                    document.title = thistitle;
+                    
+                    window.location.href = '#' + thisname;
 
                     setHeight();
 
@@ -1364,9 +1412,24 @@ endif;
             }
 
         });
+            
+        Mousetrap.bind('ctrl+shift+up', function(e) {
+            var getCurrentTab = $("li[class^='tab-item active']");
+            var previousTab = getCurrentTab.prev().attr( "class", "tab-item" );
+            previousTab.trigger("click");
+            return false;
+        }); 
+            
+        Mousetrap.bind('ctrl+shift+down', function(e) {
+            var getCurrentTab = $("li[class^='tab-item active']");
+            var nextTab = getCurrentTab.next().attr( "class", "tab-item" );
+            nextTab.trigger("click");
+            return false;
+        });     
+
+        Mousetrap.bind('s s', function() { $("li[id^='settings.phpx']").trigger("click");  });       
         </script>
 
-
     </body>
 
 </html>

+ 11 - 0
js/mousetrap.min.js

@@ -0,0 +1,11 @@
+/* mousetrap v1.6.0 craig.is/killing/mice */
+(function(r,t,g){function u(a,b,h){a.addEventListener?a.addEventListener(b,h,!1):a.attachEvent("on"+b,h)}function y(a){if("keypress"==a.type){var b=String.fromCharCode(a.which);a.shiftKey||(b=b.toLowerCase());return b}return k[a.which]?k[a.which]:p[a.which]?p[a.which]:String.fromCharCode(a.which).toLowerCase()}function D(a){var b=[];a.shiftKey&&b.push("shift");a.altKey&&b.push("alt");a.ctrlKey&&b.push("ctrl");a.metaKey&&b.push("meta");return b}function v(a){return"shift"==a||"ctrl"==a||"alt"==a||
+"meta"==a}function z(a,b){var h,c,e,g=[];h=a;"+"===h?h=["+"]:(h=h.replace(/\+{2}/g,"+plus"),h=h.split("+"));for(e=0;e<h.length;++e)c=h[e],A[c]&&(c=A[c]),b&&"keypress"!=b&&B[c]&&(c=B[c],g.push("shift")),v(c)&&g.push(c);h=c;e=b;if(!e){if(!n){n={};for(var l in k)95<l&&112>l||k.hasOwnProperty(l)&&(n[k[l]]=l)}e=n[h]?"keydown":"keypress"}"keypress"==e&&g.length&&(e="keydown");return{key:c,modifiers:g,action:e}}function C(a,b){return null===a||a===t?!1:a===b?!0:C(a.parentNode,b)}function c(a){function b(a){a=
+a||{};var b=!1,m;for(m in n)a[m]?b=!0:n[m]=0;b||(w=!1)}function h(a,b,m,f,c,h){var g,e,k=[],l=m.type;if(!d._callbacks[a])return[];"keyup"==l&&v(a)&&(b=[a]);for(g=0;g<d._callbacks[a].length;++g)if(e=d._callbacks[a][g],(f||!e.seq||n[e.seq]==e.level)&&l==e.action){var q;(q="keypress"==l&&!m.metaKey&&!m.ctrlKey)||(q=e.modifiers,q=b.sort().join(",")===q.sort().join(","));q&&(q=f&&e.seq==f&&e.level==h,(!f&&e.combo==c||q)&&d._callbacks[a].splice(g,1),k.push(e))}return k}function g(a,b,m,f){d.stopCallback(b,
+b.target||b.srcElement,m,f)||!1!==a(b,m)||(b.preventDefault?b.preventDefault():b.returnValue=!1,b.stopPropagation?b.stopPropagation():b.cancelBubble=!0)}function e(a){"number"!==typeof a.which&&(a.which=a.keyCode);var b=y(a);b&&("keyup"==a.type&&x===b?x=!1:d.handleKey(b,D(a),a))}function k(a,c,m,f){function e(c){return function(){w=c;++n[a];clearTimeout(r);r=setTimeout(b,1E3)}}function h(c){g(m,c,a);"keyup"!==f&&(x=y(c));setTimeout(b,10)}for(var d=n[a]=0;d<c.length;++d){var p=d+1===c.length?h:e(f||
+z(c[d+1]).action);l(c[d],p,f,a,d)}}function l(a,b,c,f,e){d._directMap[a+":"+c]=b;a=a.replace(/\s+/g," ");var g=a.split(" ");1<g.length?k(a,g,b,c):(c=z(a,c),d._callbacks[c.key]=d._callbacks[c.key]||[],h(c.key,c.modifiers,{type:c.action},f,a,e),d._callbacks[c.key][f?"unshift":"push"]({callback:b,modifiers:c.modifiers,action:c.action,seq:f,level:e,combo:a}))}var d=this;a=a||t;if(!(d instanceof c))return new c(a);d.target=a;d._callbacks={};d._directMap={};var n={},r,x=!1,p=!1,w=!1;d._handleKey=function(a,
+c,e){var f=h(a,c,e),d;c={};var k=0,l=!1;for(d=0;d<f.length;++d)f[d].seq&&(k=Math.max(k,f[d].level));for(d=0;d<f.length;++d)f[d].seq?f[d].level==k&&(l=!0,c[f[d].seq]=1,g(f[d].callback,e,f[d].combo,f[d].seq)):l||g(f[d].callback,e,f[d].combo);f="keypress"==e.type&&p;e.type!=w||v(a)||f||b(c);p=l&&"keydown"==e.type};d._bindMultiple=function(a,b,c){for(var d=0;d<a.length;++d)l(a[d],b,c)};u(a,"keypress",e);u(a,"keydown",e);u(a,"keyup",e)}if(r){var k={8:"backspace",9:"tab",13:"enter",16:"shift",17:"ctrl",
+18:"alt",20:"capslock",27:"esc",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down",45:"ins",46:"del",91:"meta",93:"meta",224:"meta"},p={106:"*",107:"+",109:"-",110:".",111:"/",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},B={"~":"`","!":"1","@":"2","#":"3",$:"4","%":"5","^":"6","&":"7","*":"8","(":"9",")":"0",_:"-","+":"=",":":";",'"':"'","<":",",">":".","?":"/","|":"\\"},A={option:"alt",command:"meta","return":"enter",
+escape:"esc",plus:"+",mod:/Mac|iPod|iPhone|iPad/.test(navigator.platform)?"meta":"ctrl"},n;for(g=1;20>g;++g)k[111+g]="f"+g;for(g=0;9>=g;++g)k[g+96]=g;c.prototype.bind=function(a,b,c){a=a instanceof Array?a:[a];this._bindMultiple.call(this,a,b,c);return this};c.prototype.unbind=function(a,b){return this.bind.call(this,a,function(){},b)};c.prototype.trigger=function(a,b){if(this._directMap[a+":"+b])this._directMap[a+":"+b]({},a);return this};c.prototype.reset=function(){this._callbacks={};this._directMap=
+{};return this};c.prototype.stopCallback=function(a,b){return-1<(" "+b.className+" ").indexOf(" mousetrap ")||C(b,this.target)?!1:"INPUT"==b.tagName||"SELECT"==b.tagName||"TEXTAREA"==b.tagName||b.isContentEditable};c.prototype.handleKey=function(){return this._handleKey.apply(this,arguments)};c.addKeycodes=function(a){for(var b in a)a.hasOwnProperty(b)&&(k[b]=a[b]);n=null};c.init=function(){var a=c(t),b;for(b in a)"_"!==b.charAt(0)&&(c[b]=function(b){return function(){return a[b].apply(a,arguments)}}(b))};
+c.init();r.Mousetrap=c;"undefined"!==typeof module&&module.exports&&(module.exports=c);"function"===typeof define&&define.amd&&define(function(){return c})}})("undefined"!==typeof window?window:null,"undefined"!==typeof window?document:null);

+ 110 - 0
lang/nl.ini

@@ -0,0 +1,110 @@
+WELCOME = "Welkom"
+OPTIONS = "Opties"
+EDIT_INFO = "Bewerk Info"
+UPDATE = "Update"
+GO_BACK = "Terug"
+LOGOUT = "Uitloggen"
+LOGIN = "Inloggen"
+DO_YOU_WANT_TO_LOGOUT = "Wil je uitloggen?"
+YES_WORD = "Ja"
+NO_WORD = "Nee"
+EMAIL_ADDRESS = "E-mail Adres"
+EMAIL = "E-mail"
+PASSWORD = "Wachtwoord"
+PASSWORD_AGAIN = "Herhaal wachtwoord"
+ADMIN = "Adminstrator"
+USER = "Gebruiker"
+HOLD_UP = "Wacht!"
+LOOKS_LIKE_YOU_DONT_HAVE_ACCESS = "Het lijkt dat je geen toegang hebt."
+USERNAME = "Gebruikersnaam"
+REMEMBER_ME = "Onthouden"
+FORGOT_PASSWORD = "Wachtwoord vergeten"
+RESET_PASSWORD = "Reset wachtwoord"
+DATABASE_PATH = "Database Pad"
+SPECIFY_LOCATION = "Specificeer de locatie waar je de database bestanden op wilt slaan."
+CURRENT_DIRECTORY = "Huidige map"
+PARENT_DIRECTORY = "Bovenliggende map"
+SET_DATABASE_LOCATION = "Database locatie instellen"
+SET_TIMEZONE = "Tijdzone instellen"
+DONT_WORRY = "Geen zorgen! Je database is er nog, zorg ervoor dat je de locatie gebruikt waar je database in staat."
+SAVE_LOCATION = "Sla locatie op"
+TIME_TO_LOGIN = "Nu je een administator account hebt aangemaakt, kun je inloggen en en beginnen aan je tabbladen..."
+AWESOME = "Geweldig!"
+REGISTER = "Registreer"
+CREATE_ADMIN = "Creëer Adminstrator"
+CREATE_ACCOUNT = "Creëer Adminstrator account voor Administrator toegang"
+SETTINGS = "Instellingen"
+UPLOAD_ICONS = "Upload iconen"
+VIEW_ICONS = "Bekijk iconen"
+ALL_ICONS = "Alle iconen"
+CLICK_ICON = "Klik op het icoon om hem te kopiëren"
+TABS = "Tabbladen"
+TYPE_HIT_ENTER = "Typ je nieuwe tabblad naam en druk op enter."
+ACTIVE = "Actief"
+GUEST = "Gast"
+NO_IFRAME = "Geen iFrame"
+OR = "OF"
+DEFAULT = "Standaard"
+NEW_TAB_NAME = "Nieuw Tabblad Naam"
+TAB_URL = "Tabblad URL"
+ICON_URL = "Icoon URL"
+SAVE_TABS = "Sla Tabbladen Op"
+CHOOSE_THEME = "Kies Thema"
+SAVE_OPTIONS = "Sla Opties Op"
+TITLE = "Titel"
+TITLE_TEXT = "Titel Tekst"
+NAVIGATION_BARS = "Navigatiebalken"
+TOP_BAR = "Boven Balk"
+BOTTOM_BAR = "Onder Balk"
+SIDE_BAR = "Sidebar"
+HOVER_BG = "Hover Achtergrond"
+ACTIVE_TAB = "Actieve Tabblad"
+ACTIVE_TAB_BG = "Actieve Tabblad Achtergrond"
+ACTIVE_TAB_ICON = "Actieve Tabblad Icoon"
+ACTIVE_TAB_TEXT = "Actieve Tabblad Tekst"
+INACTIVE_TAB = "Inactive Actieve Tabblad"
+INACTIVE_ICON = "Inactieve Tabblad Icoon"
+INACTIVE_TEXT = "Inactieve Tabblad Tekst"
+LOGIN_STATUS = "Login Status"
+LAST_SEEN = "Laatst gezien"
+USER_GROUP = "Gebruikers groep"
+USER_ACTIONS = "Gebruikers acties"
+DELETE = "Verwijderen"
+LOGGED_IN = "Ingelogd"
+LOGGED_OUT = "Uitgelogd"
+GOOD_LOGINS = "Succesvolle aanmeldingen"
+BAD_LOGINS = "Mislukte aanmeldingen"
+DATE = "Datum"
+IP_ADDRESS = "IP Address"
+TYPE = "Typ"
+NOTHING_LOG = "Niets in log..........."
+PURGE_LOG = "Leeg Log"
+LOGO_URL_TITLE = "Logo URL Voor Titel"
+LOADING_ICON_URL = "Laad Icoon URL"
+ABOUT = "Over"
+INSTALLED_VERSION = "Geïnstalleerde Versie"
+CURRENT_VERSION = "Huidige Versie"
+DELETE_DATABASE = "Verwijder Database"
+DELETE_WARNING = "Doe dit alleen als het nodig is voor een upgrade. Hierdoor zal je database verwijderd worden en dit kan niet terug gedraaid worden. Zorg er dus voor dat je een backup hebt, ook van je gebruikers."
+SUBMIT_ISSUE = "Dien Aanvraag Of Klacht In"
+VIEW_ON_GITHUB = "Bekijk Op GitHub"
+CHAT_WITH_US = "Chat Met Ons"
+TABS_SAVED = "Tabbladen Opgeslagen!"
+APPLY_CHANGES = "Wijzigingen Toepassen"
+APPLY_RELOAD = "Wijzigingen toepassen om de pagina te vernieuwen!"
+OK = "OKE"
+COLORS_SAVED = "Kleuren opgeslagen!"
+NEW_VERSION = "Nieuwe Versie Beschikbaar"
+CLICK_INFO = "Klik Op Info Tabblad"
+WHATS_NEW = "Wat is er nieuw in"
+CHANGES = "Veranderingen"
+AUTO_UPGRADE = "Automatisch Upgraden"
+SOFTWARE_IS = "Software is"
+UP_TO_DATE = "Actueel!"
+PREVIOUS = "Vorige"
+NEXT = "Volgende"
+PRINT = "Print"
+SEARCH = "Zoek"
+SHOW_ENTRYS = "Toon"
+ENTRIES = "INZENDINGEN"
+SHOW_ENTRY_CURRENT = "Laat %1 tot %2 tot %3 inzendingen zien"

+ 2 - 2
settings.php

@@ -692,7 +692,7 @@ endif;
                                             <?php
                                             $dirname = "images/";
                                             $images = scandir($dirname);
-                                            $ignore = Array(".", "..", "favicon/", "favicon", "._.DS_Store", ".DS_Store", "sowwy.png", "sort-btns", "loading.png");
+                                            $ignore = Array(".", "..", "favicon/", "favicon", "._.DS_Store", ".DS_Store", "sowwy.png", "sort-btns", "loading.png", "titlelogo.png");
                                             foreach($images as $curimg){
                                                 if(!in_array($curimg, $ignore)) { ?>
 
@@ -1946,7 +1946,7 @@ endif;
                 dataType: "json",
                 success: function(github) {
                    
-                    var currentVersion = "0.998";
+                    var currentVersion = "0.999";
                     var githubVersion = github.tag_name;
                     var githubDescription = github.body;
                     var githubName = github.name;

Alguns arquivos não foram mostrados porque muitos arquivos mudaram nesse diff