Browse Source

Merge pull request #78 from causefx/develop

NEW FEATURE ALERT Double Tab
causefx 9 years ago
parent
commit
3bad53c2fd
11 changed files with 454 additions and 77 deletions
  1. 1 0
      css/style.css
  2. 139 15
      index.php
  3. 0 43
      js/common.js
  4. 16 0
      js/menu/gnmenu.js
  5. 28 1
      lang/de.ini
  6. 30 3
      lang/en.ini
  7. 30 3
      lang/es.ini
  8. 30 3
      lang/fr.ini
  9. 30 3
      lang/it.ini
  10. 149 6
      settings.php
  11. 1 0
      user.php

+ 1 - 0
css/style.css

@@ -4461,6 +4461,7 @@ body .ns-effect-loadingcircle {
 /*Buttons*/
 .btn {
   border: 0;
+  margin-bottom: 2px;
 }
 
 .btn, .btn-group {

+ 139 - 15
index.php

@@ -149,8 +149,6 @@ else :
 
     $USER = new User("registration_callback");
 
-    date_default_timezone_set(TIMEZONE);
-
     $dbfile = DATABASE_LOCATION  . constant('User::DATABASE_NAME') . ".db";
 
     $database = new PDO("sqlite:" . $dbfile);
@@ -319,9 +317,12 @@ endif;
                     
                     <div class="la-ball-scale-multiple la-3x" style="color: <?=$topbar;?>">
                         
-                        <div></div>
-                        <div></div>
-                        <div></div>
+                        <?php if (pathinfo($loadingIcon, PATHINFO_EXTENSION) !== "gif" ) : 
+                        
+                            echo "<div></div><div></div><div></div>";
+                        
+                        endif; ?>
+                        
                         <logo class="logo"><img height="192px" src="<?=$loadingIcon;?>"></logo>
                     
                     </div>
@@ -332,7 +333,7 @@ endif;
         
         </div>
 
-        <div id="main-wrapper" class="main-wrapper">
+        <div id="main-wrapper" class="main-wrapper" tabindex="-1">
             
             <style>
                 .bottom-bnts a {
@@ -395,6 +396,11 @@ endif;
                     background: <?=$activetabBG;?>;
                     border-radius: 100px 0 0 100px;
                 
+                }.gn-menu li.rightActive > a {
+                    
+                    background: <?=$hoverbg;?>;
+                    border-radius: 100px 0 0 100px;
+                
                 }.active {
                     
                     display: block;
@@ -455,8 +461,20 @@ endif;
                     opacity: 0.5;
                     filter: alpha(opacity=50);
 
+                }.mini-nav .split {
+                    width: calc(50% - 25px);
+                }.splitRight {
+                    width: 50%;
+                    margin-left: 50% !important;
+                    position: absolute !important;
+                }.split {
+                    width: 50%;
+                    position: absolute !important;
+                }.mini-nav .splitRight {
+                    margin-left: calc(50% + 25px) !important;
+                    width: calc(50% - 25px);
                 }
-                
+
             </style>
 
             <ul id="gn-menu" class="gn-menu-main">
@@ -738,8 +756,6 @@ 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>-->
-                                                
                                                 <?php echo getTimezone();?>
                                                 
                                                 <h5><?php echo $language->translate("SET_TIMEZONE");?></h5>
@@ -849,6 +865,8 @@ endif;
                 <?php endif;?>
                 <!--End Load Framed Content-->
             
+            </div>
+            <div id="contentRight" class="content splitRight" style="">
             </div>
             <!--End Content-->
 
@@ -1247,6 +1265,8 @@ endif;
             if (defaultTab){
 
                 $("#content").html('<div class="iframe active" data-content-url="'+defaultTab+'"><iframe scrolling="auto" sandbox="allow-forms allow-same-origin allow-pointer-lock allow-scripts allow-popups allow-modals allow-top-navigation" allowfullscreen="true" webkitallowfullscreen="true" mozallowfullscreen="true" frameborder="0" style="width:100%; height:100%;" src="'+defaultTab+'"></iframe></div>');
+                document.getElementById('main-wrapper').focus();
+                
             }
             
             if (defaultTab == null){
@@ -1321,6 +1341,34 @@ endif;
 
         });
             
+        $('#reload').on('contextmenu', function(e){
+
+            $("i[class^='mdi mdi-refresh']").attr("class", "mdi mdi-refresh fa-spin");
+
+            var activeFrame = $('#contentRight').find('.active').children('iframe');
+
+            activeFrame.attr('src', activeFrame.attr('src'));
+
+            var refreshBox = $('#contentRight').find('.active');
+
+            $("<div class='refresh-preloader'><div class='la-timer la-dark'><div></div></div></div>").appendTo(refreshBox).fadeIn(10);
+
+            setTimeout(function(){
+
+                var refreshPreloader = refreshBox.find('.refresh-preloader'),
+                deletedRefreshBox = refreshPreloader.fadeOut(300, function(){
+
+                    refreshPreloader.remove();
+                    $("i[class^='mdi mdi-refresh fa-spin']").attr("class", "mdi mdi-refresh");
+
+                });
+
+            },500);
+            
+            return false;
+
+        });
+            
         $("li[id^='settings.phpx']").on('click tap', function(){
 
             $("img[id^='settings-icon']").attr("class", "fa-spin");
@@ -1357,7 +1405,7 @@ endif;
 
             var thisid = thisidfull.substr(0, thisidfull.length-1);
 
-            var currentframe = $("div[data-content-url^='"+thisid+"']");
+            var currentframe = $("#content div[data-content-url^='"+thisid+"']");
 
             if (currentframe.attr("class") == "iframe active") {
 
@@ -1367,7 +1415,7 @@ endif;
 
                 console.log(thisid + " is active already but hidden");
 
-                $("div[class^='iframe active']").attr("class", "iframe hidden");
+                $("#content div[class^='iframe active']").attr("class", "iframe hidden");
 
                 currentframe.attr("class", "iframe active");
                 
@@ -1382,8 +1430,6 @@ endif;
                 $(this).attr("class", "tab-item active");
 
             }else {
-
-                
                 
                 if ($(this).attr("window") == "true") {
                     
@@ -1393,7 +1439,7 @@ endif;
                 
                     console.log(thisid + " make new div");
 
-                    $("div[class^='iframe active']").attr("class", "iframe hidden");
+                    $("#content 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" );
                     
@@ -1413,6 +1459,76 @@ endif;
 
         });
             
+        $("li[class^='tab-item']").on('contextmenu', function(e){
+            
+            e.stopPropagation();
+            
+            $("#content").attr("class", "content split");
+            
+            var thisidfull = $(this).attr("id");
+            
+            var thistitle = $(this).attr("data-title");
+            
+            var thisname = $(this).attr("name");
+
+            var thisid = thisidfull.substr(0, thisidfull.length-1);
+
+            var currentframe = $("#contentRight div[data-content-url^='"+thisid+"']");
+
+            if (currentframe.attr("class") == "iframe active") {
+
+                console.log(thisid + " is active already");
+
+            }else if (currentframe.attr("class") == "iframe hidden") {
+
+                console.log(thisid + " is active already but hidden");
+
+                $("#contentRight div[class^='iframe active']").attr("class", "iframe hidden");
+
+                currentframe.attr("class", "iframe active");
+                
+                document.title = thistitle;
+                
+                window.location.href = '#' + thisname;
+                
+                setHeight();
+
+                $("li[class^='tab-item rightActive']").attr("class", "tab-item");
+
+                $(this).attr("class", "tab-item rightActive");
+
+            }else {
+                
+                if ($(this).attr("window") == "true") {
+                    
+                    window.open(thisid,'_blank');
+                    
+                }else {
+                
+                    console.log(thisid + " make new div");
+
+                    $("#contentRight 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( "#contentRight" );
+                    
+                    document.title = thistitle;
+                    
+                    window.location.href = '#' + thisname;
+
+                    setHeight();
+
+                    $("li[class^='tab-item rightActive']").attr("class", "tab-item");
+
+                    $(this).attr("class", "tab-item rightActive");
+                    
+                }
+
+            }
+            
+            return false;
+                
+        });
+            
         Mousetrap.bind('ctrl+shift+up', function(e) {
             var getCurrentTab = $("li[class^='tab-item active']");
             var previousTab = getCurrentTab.prev().attr( "class", "tab-item" );
@@ -1427,7 +1543,15 @@ endif;
             return false;
         });     
 
-        Mousetrap.bind('s s', function() { $("li[id^='settings.phpx']").trigger("click");  });       
+        Mousetrap.bind('s s', function() { $("li[id^='settings.phpx']").trigger("click");  });
+        
+        Mousetrap.bind('esc esc', function() {
+            
+            $("#content").attr("class", "content");
+            $("li[class^='tab-item rightActive']").attr("class", "tab-item");
+            $("#contentRight").html('');
+        
+        });    
         </script>
 
     </body>

+ 0 - 43
js/common.js

@@ -5,14 +5,6 @@
  *
 */
 
-var datetime = null,
-        date = null;
-
-var update = function () {
-    date = moment(new Date())
-    datetime.html(date.format('h:mm A'));
-};
-
 $(window).on('load', function(){
     //Preloader
     setTimeout(function(){
@@ -29,11 +21,6 @@ $(function () {
   //Menu
   new gnMenu( document.getElementById( 'gn-menu' ) );
 
-  //Choose Language
-  [].slice.call( document.querySelectorAll( 'select.cs-select' ) ).forEach( function(el) {
-        new SelectFx(el);
-  } );
-
   //Refresh button
   $('.repeat-btn').click(function(e){
     var refreshBox = $(this).closest('div.content-box');
@@ -63,37 +50,10 @@ $(function () {
     mobileMenuWidth();
   }
 
-  //Smooth scrolling for body
-  /*$("body").niceScroll({
-    railpadding: {top:56,right:0,left:0,bottom:0},
-    scrollspeed: 30,
-    mousescrollstep: 60
-  });*/
-
-
   //Waves effect on buttons
   Waves.attach('.waves', ['waves-float']);
   Waves.init();
 
-  //Current Date
-  var dt = new Date(),
-      year = dt.getFullYear(),
-      months = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'],
-      month = dt.getMonth(),
-      days = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],
-      day = dt.getDay(),
-      date = dt.getDate();
-
-  $('.year').append(year);
-  $('.month').append(months[month]);
-  $('.weekday').append(days[day]);
-  $('.date').append(date);
-
-  //Current Time
-  datetime = $('.current-time')
-  update();
-  setInterval(update, 60000);
-
   //Close Content Box
   $('.close-btn').click(function(e){
     var closedBox = $(this).closest('div.content-box').remove();
@@ -132,9 +92,6 @@ $(function () {
     e.preventDefault();
   });
 
-  // Full height of content
-  //$('#content').css("height", $(window).height() - 56 + "px" );
-  //$("div").find(".iframe").css("height", $(window).height() - 56 + "px" );
   //Fixed gn-menu
   $('.fix-nav').click(function(e){
     if($(window).width() > 422) {

+ 16 - 0
js/menu/gnmenu.js

@@ -83,6 +83,22 @@
    
             });
             
+            $("li[class^='tab-item']").on('contextmenu', function(e){
+            
+            e.stopPropagation();
+
+
+                if( self.isMenuOpen ) {
+					self._closeMenu();
+					document.removeEventListener( self.eventtype, self.bodyClickFn );
+				}
+				/*else {
+					self._openMenu();
+					document.addEventListener( self.eventtype, self.bodyClickFn );
+				}*/
+                return false;
+            });
+            
 		},
 		_openIconMenu : function() {
 			classie.add( this.menu, 'gn-open-part' );

+ 28 - 1
lang/de.ini

@@ -107,4 +107,31 @@ PRINT = "Drucken"
 SEARCH = "Suchen"
 SHOW = "Zeige"
 ENTRIES = "Einträge"
-SHOW_ENTRY_CURRENT = "Zeige %1 bis %2 von %3 Einträgen"
+SHOW_ENTRY_CURRENT = "Zeige|bis|von|Einträgen"
+HELP = "Help"
+ADDING_TABS = "Adding Tabs"
+QUICK_ACCESS = "Quick Access Tabs [Bookmarks/Hash]"
+START_ADDING_TABS = "To start adding tabs, all you need to do is type the Tab Name and hit ENTER. The following information is then needed:"
+TAB_URL_ABOUT = "The URL of the Tab"
+ICON_URL_ABOUT = "You may either use an icon from the box, or you may upload or use an image provided that is listed in the View Icons section"
+DEFAULT_ABOUT = "You may have one tab that will be loaded upon webpage launch"
+ACTIVE_ABOUT = "This option allows the tab to be loaded on the list of  tabs"
+USER_ABOUT = "This option allows the tab to loaded on a users lists if they are signed in"
+GUEST_ABOUT = "This option allows the tab to loaded on the list of anyone accessing the webpage"
+NO_IFRAME_ABOUT = "This option will open the tab in a new window and not inside the webpage"
+QUICK_ACCESS_ABOUT = "For easy access we have made it so you can use [#] along with the Tab Name to access your tab easily.  Just type in the hash into the URL and you are good to go.  You can use this for straight access to a tab or for a bookmark.  i.e."
+SIDE_BY_SIDE = "Side by Side View"
+SIDE_BY_SIDE_ABOUT = "For multi-taskers we have setup an easy way for you to work on two things at once.  To get started, here are the basics:"
+SIDE_BY_SIDE_INSTRUCTIONS1 = "Right-Click on any tab to enable side by side"
+SIDE_BY_SIDE_INSTRUCTIONS2 = "If you would like to refresh the right side, Right-Click on this icon"
+SIDE_BY_SIDE_INSTRUCTIONS3 = "Once you are done with side by side, use the [esc] + [esc] Keyboard Shortcut listed below"
+KEYBOARD_SHORTCUTS = "Keyboard Shortcuts"
+KEYBOARD_SHORTCUTS_ABOUT = "Organizr has some bulit-in keyboard shortcuts for ease of use.  The following is useable if Organizr has focus and not the iFrame."
+KEYBOARD_INSTRUCTIONS1 = "will take you to the settings menu"
+KEYBOARD_INSTRUCTIONS2 = "will take you to the next tab"
+KEYBOARD_INSTRUCTIONS3 = "will take you to the previous tab"
+KEYBOARD_INSTRUCTIONS4 = "will exit Side by Side View"
+CLOSE = "Close"
+NO_ENTRIES = "No entries to show"
+FILTERED = "(filtered from|total entries)"
+NO_MATCHING = "No matching records found"

+ 30 - 3
lang/en.ini

@@ -105,6 +105,33 @@ PREVIOUS = "Previous"
 NEXT = "Next"
 PRINT = "Print"
 SEARCH = "Search"
-SHOW_ENTRYS = "Show"
-ENTRIES = "ENTRIES"
-SHOW_ENTRY_CURRENT = "Showing %1 to %2 of %3 entries"
+SHOW = "Show"
+ENTRIES = "Entries"
+SHOW_ENTRY_CURRENT = "Showing|to|of|entries"
+HELP = "Help"
+ADDING_TABS = "Adding Tabs"
+QUICK_ACCESS = "Quick Access Tabs [Bookmarks/Hash]"
+START_ADDING_TABS = "To start adding tabs, all you need to do is type the Tab Name and hit ENTER. The following information is then needed:"
+TAB_URL_ABOUT = "The URL of the Tab"
+ICON_URL_ABOUT = "You may either use an icon from the box, or you may upload or use an image provided that is listed in the View Icons section"
+DEFAULT_ABOUT = "You may have one tab that will be loaded upon webpage launch"
+ACTIVE_ABOUT = "This option allows the tab to be loaded on the list of  tabs"
+USER_ABOUT = "This option allows the tab to loaded on a users lists if they are signed in"
+GUEST_ABOUT = "This option allows the tab to loaded on the list of anyone accessing the webpage"
+NO_IFRAME_ABOUT = "This option will open the tab in a new window and not inside the webpage"
+QUICK_ACCESS_ABOUT = "For easy access we have made it so you can use [#] along with the Tab Name to access your tab easily.  Just type in the hash into the URL and you are good to go.  You can use this for straight access to a tab or for a bookmark.  i.e."
+SIDE_BY_SIDE = "Side by Side View"
+SIDE_BY_SIDE_ABOUT = "For multi-taskers we have setup an easy way for you to work on two things at once.  To get started, here are the basics:"
+SIDE_BY_SIDE_INSTRUCTIONS1 = "Right-Click on any tab to enable side by side"
+SIDE_BY_SIDE_INSTRUCTIONS2 = "If you would like to refresh the right side, Right-Click on this icon"
+SIDE_BY_SIDE_INSTRUCTIONS3 = "Once you are done with side by side, use the [esc] + [esc] Keyboard Shortcut listed below"
+KEYBOARD_SHORTCUTS = "Keyboard Shortcuts"
+KEYBOARD_SHORTCUTS_ABOUT = "Organizr has some bulit-in keyboard shortcuts for ease of use.  The following is useable if Organizr has focus and not the iFrame."
+KEYBOARD_INSTRUCTIONS1 = "will take you to the settings menu"
+KEYBOARD_INSTRUCTIONS2 = "will take you to the next tab"
+KEYBOARD_INSTRUCTIONS3 = "will take you to the previous tab"
+KEYBOARD_INSTRUCTIONS4 = "will exit Side by Side View"
+CLOSE = "Close"
+NO_ENTRIES = "No entries to show"
+FILTERED = "(filtered from|total entries)"
+NO_MATCHING = "No matching records found"

+ 30 - 3
lang/es.ini

@@ -105,6 +105,33 @@ PREVIOUS = "Previous"
 NEXT = "Next"
 PRINT = "Print"
 SEARCH = "Search"
-SHOW_ENTRYS = "Show"
-ENTRIES = "ENTRIES"
-SHOW_ENTRY_CURRENT = "Showing %1 to %2 of %3 entries"
+SHOW = "Show"
+ENTRIES = "Entries"
+SHOW_ENTRY_CURRENT = "Showing|to|of|entries"
+HELP = "Help"
+ADDING_TABS = "Adding Tabs"
+QUICK_ACCESS = "Quick Access Tabs [Bookmarks/Hash]"
+START_ADDING_TABS = "To start adding tabs, all you need to do is type the Tab Name and hit ENTER. The following information is then needed:"
+TAB_URL_ABOUT = "The URL of the Tab"
+ICON_URL_ABOUT = "You may either use an icon from the box, or you may upload or use an image provided that is listed in the View Icons section"
+DEFAULT_ABOUT = "You may have one tab that will be loaded upon webpage launch"
+ACTIVE_ABOUT = "This option allows the tab to be loaded on the list of  tabs"
+USER_ABOUT = "This option allows the tab to loaded on a users lists if they are signed in"
+GUEST_ABOUT = "This option allows the tab to loaded on the list of anyone accessing the webpage"
+NO_IFRAME_ABOUT = "This option will open the tab in a new window and not inside the webpage"
+QUICK_ACCESS_ABOUT = "For easy access we have made it so you can use [#] along with the Tab Name to access your tab easily.  Just type in the hash into the URL and you are good to go.  You can use this for straight access to a tab or for a bookmark.  i.e."
+SIDE_BY_SIDE = "Side by Side View"
+SIDE_BY_SIDE_ABOUT = "For multi-taskers we have setup an easy way for you to work on two things at once.  To get started, here are the basics:"
+SIDE_BY_SIDE_INSTRUCTIONS1 = "Right-Click on any tab to enable side by side"
+SIDE_BY_SIDE_INSTRUCTIONS2 = "If you would like to refresh the right side, Right-Click on this icon"
+SIDE_BY_SIDE_INSTRUCTIONS3 = "Once you are done with side by side, use the [esc] + [esc] Keyboard Shortcut listed below"
+KEYBOARD_SHORTCUTS = "Keyboard Shortcuts"
+KEYBOARD_SHORTCUTS_ABOUT = "Organizr has some bulit-in keyboard shortcuts for ease of use.  The following is useable if Organizr has focus and not the iFrame."
+KEYBOARD_INSTRUCTIONS1 = "will take you to the settings menu"
+KEYBOARD_INSTRUCTIONS2 = "will take you to the next tab"
+KEYBOARD_INSTRUCTIONS3 = "will take you to the previous tab"
+KEYBOARD_INSTRUCTIONS4 = "will exit Side by Side View"
+CLOSE = "Close"
+NO_ENTRIES = "No entries to show"
+FILTERED = "(filtered from|total entries)"
+NO_MATCHING = "No matching records found"

+ 30 - 3
lang/fr.ini

@@ -105,6 +105,33 @@ PREVIOUS = "Previous"
 NEXT = "Next"
 PRINT = "Print"
 SEARCH = "Search"
-SHOW_ENTRYS = "Show"
-ENTRIES = "ENTRIES"
-SHOW_ENTRY_CURRENT = "Showing %1 to %2 of %3 entries"
+SHOW = "Show"
+ENTRIES = "Entries"
+SHOW_ENTRY_CURRENT = "Showing|to|of|entries"
+HELP = "Help"
+ADDING_TABS = "Adding Tabs"
+QUICK_ACCESS = "Quick Access Tabs [Bookmarks/Hash]"
+START_ADDING_TABS = "To start adding tabs, all you need to do is type the Tab Name and hit ENTER. The following information is then needed:"
+TAB_URL_ABOUT = "The URL of the Tab"
+ICON_URL_ABOUT = "You may either use an icon from the box, or you may upload or use an image provided that is listed in the View Icons section"
+DEFAULT_ABOUT = "You may have one tab that will be loaded upon webpage launch"
+ACTIVE_ABOUT = "This option allows the tab to be loaded on the list of  tabs"
+USER_ABOUT = "This option allows the tab to loaded on a users lists if they are signed in"
+GUEST_ABOUT = "This option allows the tab to loaded on the list of anyone accessing the webpage"
+NO_IFRAME_ABOUT = "This option will open the tab in a new window and not inside the webpage"
+QUICK_ACCESS_ABOUT = "For easy access we have made it so you can use [#] along with the Tab Name to access your tab easily.  Just type in the hash into the URL and you are good to go.  You can use this for straight access to a tab or for a bookmark.  i.e."
+SIDE_BY_SIDE = "Side by Side View"
+SIDE_BY_SIDE_ABOUT = "For multi-taskers we have setup an easy way for you to work on two things at once.  To get started, here are the basics:"
+SIDE_BY_SIDE_INSTRUCTIONS1 = "Right-Click on any tab to enable side by side"
+SIDE_BY_SIDE_INSTRUCTIONS2 = "If you would like to refresh the right side, Right-Click on this icon"
+SIDE_BY_SIDE_INSTRUCTIONS3 = "Once you are done with side by side, use the [esc] + [esc] Keyboard Shortcut listed below"
+KEYBOARD_SHORTCUTS = "Keyboard Shortcuts"
+KEYBOARD_SHORTCUTS_ABOUT = "Organizr has some bulit-in keyboard shortcuts for ease of use.  The following is useable if Organizr has focus and not the iFrame."
+KEYBOARD_INSTRUCTIONS1 = "will take you to the settings menu"
+KEYBOARD_INSTRUCTIONS2 = "will take you to the next tab"
+KEYBOARD_INSTRUCTIONS3 = "will take you to the previous tab"
+KEYBOARD_INSTRUCTIONS4 = "will exit Side by Side View"
+CLOSE = "Close"
+NO_ENTRIES = "No entries to show"
+FILTERED = "(filtered from|total entries)"
+NO_MATCHING = "No matching records found"

+ 30 - 3
lang/it.ini

@@ -105,6 +105,33 @@ PREVIOUS = "Previous"
 NEXT = "Next"
 PRINT = "Print"
 SEARCH = "Search"
-SHOW_ENTRYS = "Show"
-ENTRIES = "ENTRIES"
-SHOW_ENTRY_CURRENT = "Showing %1 to %2 of %3 entries"
+SHOW = "Show"
+ENTRIES = "Entries"
+SHOW_ENTRY_CURRENT = "Showing|to|of|entries"
+HELP = "Help"
+ADDING_TABS = "Adding Tabs"
+QUICK_ACCESS = "Quick Access Tabs [Bookmarks/Hash]"
+START_ADDING_TABS = "To start adding tabs, all you need to do is type the Tab Name and hit ENTER. The following information is then needed:"
+TAB_URL_ABOUT = "The URL of the Tab"
+ICON_URL_ABOUT = "You may either use an icon from the box, or you may upload or use an image provided that is listed in the View Icons section"
+DEFAULT_ABOUT = "You may have one tab that will be loaded upon webpage launch"
+ACTIVE_ABOUT = "This option allows the tab to be loaded on the list of  tabs"
+USER_ABOUT = "This option allows the tab to loaded on a users lists if they are signed in"
+GUEST_ABOUT = "This option allows the tab to loaded on the list of anyone accessing the webpage"
+NO_IFRAME_ABOUT = "This option will open the tab in a new window and not inside the webpage"
+QUICK_ACCESS_ABOUT = "For easy access we have made it so you can use [#] along with the Tab Name to access your tab easily.  Just type in the hash into the URL and you are good to go.  You can use this for straight access to a tab or for a bookmark.  i.e."
+SIDE_BY_SIDE = "Side by Side View"
+SIDE_BY_SIDE_ABOUT = "For multi-taskers we have setup an easy way for you to work on two things at once.  To get started, here are the basics:"
+SIDE_BY_SIDE_INSTRUCTIONS1 = "Right-Click on any tab to enable side by side"
+SIDE_BY_SIDE_INSTRUCTIONS2 = "If you would like to refresh the right side, Right-Click on this icon"
+SIDE_BY_SIDE_INSTRUCTIONS3 = "Once you are done with side by side, use the [esc] + [esc] Keyboard Shortcut listed below"
+KEYBOARD_SHORTCUTS = "Keyboard Shortcuts"
+KEYBOARD_SHORTCUTS_ABOUT = "Organizr has some bulit-in keyboard shortcuts for ease of use.  The following is useable if Organizr has focus and not the iFrame."
+KEYBOARD_INSTRUCTIONS1 = "will take you to the settings menu"
+KEYBOARD_INSTRUCTIONS2 = "will take you to the next tab"
+KEYBOARD_INSTRUCTIONS3 = "will take you to the previous tab"
+KEYBOARD_INSTRUCTIONS4 = "will exit Side by Side View"
+CLOSE = "Close"
+NO_ENTRIES = "No entries to show"
+FILTERED = "(filtered from|total entries)"
+NO_MATCHING = "No matching records found"

+ 149 - 6
settings.php

@@ -10,10 +10,10 @@ function registration_callback($username, $email, $userdir)
     global $data;
     $data = array($username, $email, $userdir);
 }
-require_once("translate.php");
+
 require_once("user.php");
 $USER = new User("registration_callback");
-date_default_timezone_set(TIMEZONE);
+require_once("translate.php");
 
 if(!$USER->authenticated) :
 
@@ -35,6 +35,13 @@ function printArray($arrayName){
     
 }
 
+function explosion($string, $position){
+    
+    $getWord = explode("|", $string);
+    return $getWord[$position];
+    
+}
+
 function write_ini_file($content, $path) { 
     
     if (!$handle = fopen($path, 'w')) {
@@ -51,6 +58,22 @@ function write_ini_file($content, $path) {
 
 }
 
+function getServerPath(){
+    
+    if (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off') { 
+        
+        $protocol = "https://"; 
+    
+    } else {  
+        
+        $protocol = "http://"; 
+    
+    }
+    
+    return $protocol . $_SERVER['SERVER_NAME'] . dirname($_SERVER['REQUEST_URI']);
+      
+}
+
 $dbfile = DATABASE_LOCATION  . constant('User::DATABASE_NAME') . ".db";
 $databaseLocation = "databaseLocation.ini.php";
 $userdirpath = USER_HOME;
@@ -589,7 +612,37 @@ endif;
                 display: none;
             }input.form-control.iconpicker-search {
                 color: black;
-            }
+            }.key {
+    font-family:Tahoma, sans-serif;
+    border-style:solid;
+    border-color:#D5D6AD #C1C1A8 #CDCBA5 #E7E5C5;
+    border-width:2px 3px 8px 3px;
+    background:#D6D4B4;
+    display:inline-block;
+    border-radius:5px;
+    margin:3px;
+    text-align:center;
+}
+
+.key span {
+    background:#ECEECA;
+    color:#5D5E4F;
+    display:block;
+    font-size:12px;
+    padding:0 2px;
+    border-radius:3px;
+    width:14px;
+    height:18px;
+    line-height:18px;
+    text-align:center;
+    font-weight:bold;
+    letter-spacing:1px;
+    text-transform:uppercase;
+}
+.key.wide span {
+    width:auto;
+    padding:0 12px;
+}
         
         </style>
        
@@ -1235,7 +1288,83 @@ endif;
                                     
                                         <a href='https://github.com/causefx/Organizr/issues/new' target='_blank' type='button' class='btn waves btn-labeled btn-success btn text-uppercase waves-effect waves-float'><span class='btn-label'><i class='fa fa-github-alt'></i></span><?php echo $language->translate("SUBMIT_ISSUE");?></a> 
                                         <a href='https://github.com/causefx/Organizr' target='_blank' type='button' class='btn waves btn-labeled btn-primary btn text-uppercase waves-effect waves-float'><span class='btn-label'><i class='fa fa-github'></i></span><?php echo $language->translate("VIEW_ON_GITHUB");?></a>
-                                        <a href='https://riot.im/app/#/room/#iCauseFX:matrix.org' target='_blank' type='button' class='btn waves btn-labeled btn-dark btn text-uppercase waves-effect waves-float'><span class='btn-label'><i class='fa fa-comments-o'></i></span><?php echo $language->translate("CHAT_WITH_US");?></a>
+                                        <a href='https://gitter.im/Organizrr/Lobby' target='_blank' type='button' class='btn waves btn-labeled btn-dark btn text-uppercase waves-effect waves-float'><span class='btn-label'><i class='fa fa-comments-o'></i></span><?php echo $language->translate("CHAT_WITH_US");?></a>
+                                        <button type="button" class="class='btn waves btn-labeled btn-warning btn text-uppercase waves-effect waves-float" data-toggle="modal" data-target=".Help-Me-modal-lg"><span class='btn-label'><i class='fa fa-life-ring'></i></span><?php echo $language->translate("HELP");?></button>
+
+                                        <div class="modal fade Help-Me-modal-lg" tabindex="-1" role="dialog">
+                                        
+                                            <div class="modal-dialog modal-lg" role="document">
+                                        
+                                                <div class="modal-content gray-bg">
+                                        
+                                                    <div class="modal-header">
+                                        
+                                                        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
+                                        
+                                                        <h4 class="modal-title"><?php echo $language->translate("HELP");?>!</h4>
+                                        
+                                                    </div>
+                                        
+                                                    <div class="modal-body">
+                                        
+                                                        <h4><strong><?php echo $language->translate("ADDING_TABS");?></strong></h4>
+                                                        
+                                                        <p><?php echo $language->translate("START_ADDING_TABS");?></p>
+                                                            
+                                                        <ul>
+
+                                                            <li><strong><?php echo $language->translate("TAB_URL");?></strong> <?php echo $language->translate("TAB_URL_ABOUT");?></li>
+                                                            <li><strong><?php echo $language->translate("ICON_URL");?></strong> <?php echo $language->translate("ICON_URL_ABOUT");?></li>
+                                                            <li><strong><?php echo $language->translate("DEFAULT");?></strong> <?php echo $language->translate("DEFAULT_ABOUT");?></li>
+                                                            <li><strong><?php echo $language->translate("ACTIVE");?></strong> <?php echo $language->translate("ACTIVE_ABOUT");?></li>
+                                                            <li><strong><?php echo $language->translate("USER");?></strong> <?php echo $language->translate("USER_ABOUT");?></li>
+                                                            <li><strong><?php echo $language->translate("GUEST");?></strong> <?php echo $language->translate("GUEST_ABOUT");?></li>
+                                                            <li><strong><?php echo $language->translate("NO_IFRAME");?></strong> <?php echo $language->translate("NO_IFRAME_ABOUT");?></li>        
+
+                                                        </ul>
+
+                                                        <h4><strong><?php echo $language->translate("QUICK_ACCESS");?></strong></h4>
+                                                    
+                                                        <p><?php echo $language->translate("QUICK_ACCESS_ABOUT");?> <mark><?php echo getServerPath(); ?>#Sonarr</mark></p>
+                                                        
+                                                        <h4><strong><?php echo $language->translate("SIDE_BY_SIDE");?></strong></h4>
+                                                        
+                                                        <p><?php echo $language->translate("SIDE_BY_SIDE_ABOUT");?></p>
+                                                        
+                                                        <ul>
+                                                        
+                                                            <li><?php echo $language->translate("SIDE_BY_SIDE_INSTRUCTIONS1");?></li>
+                                                            <li><?php echo $language->translate("SIDE_BY_SIDE_INSTRUCTIONS2");?> [<i class='fa fa-refresh'></i>]</li>
+                                                            <li><?php echo $language->translate("SIDE_BY_SIDE_INSTRUCTIONS3");?></li>
+                                                        
+                                                        </ul>
+
+                                                        <h4><strong><?php echo $language->translate("KEYBOARD_SHORTCUTS");?></strong></h4>
+                                                    
+                                                        <p><?php echo $language->translate("KEYBOARD_SHORTCUTS_ABOUT");?></p>
+                                                        
+                                                        <ul>
+                                                            
+                                                            <li><keyboard class="key"><span>S</span></keyboard> + <keyboard class="key"><span>S</span></keyboard> <?php echo $language->translate("KEYBOARD_INSTRUCTIONS1");?></li>
+                                                            <li><keyboard class="key wide"><span>Ctrl</span></keyboard> + <keyboard class="key wide"><span>Shift</span></keyboard> + <keyboard class="key"><span>&darr;</span></keyboard> <?php echo $language->translate("KEYBOARD_INSTRUCTIONS2");?></li>
+                                                            <li><keyboard class="key wide"><span>Ctrl</span></keyboard> + <keyboard class="key wide"><span>Shift</span></keyboard> + <keyboard class="key"><span>&uarr;</span></keyboard> <?php echo $language->translate("KEYBOARD_INSTRUCTIONS3");?></li>
+                                                            <li><keyboard class="key wide"><span>Esc</span></keyboard> + <keyboard class="key wide"><span>Esc</span></keyboard> <?php echo $language->translate("KEYBOARD_INSTRUCTIONS4");?></li>
+                                                            
+                                                        </ul>
+                                                        
+                                                    </div>
+                                                    
+                                                    <div class="modal-footer">
+                                        
+                                                        <button type="button" class="btn btn-default waves" data-dismiss="modal"><?php echo $language->translate("CLOSE");?></button>
+                                        
+                                                    </div>
+                                        
+                                                </div>
+                                        
+                                            </div>
+                                        
+                                        </div>
                                     
                                     </p>
                                     
@@ -1502,7 +1631,19 @@ endif;
                     displayLength: 10,
                     dom: 'T<"clear">lfrtip',
                 responsive: true,
-                    "order": [[ 0, 'desc' ]]
+                    "order": [[ 0, 'desc' ]],
+                    "language": {
+			           "info": "<?php echo explosion($language->translate('SHOW_ENTRY_CURRENT'), 0);?> _START_ <?php echo explosion($language->translate('SHOW_ENTRY_CURRENT'), 1);?> _END_ <?php echo explosion($language->translate('SHOW_ENTRY_CURRENT'), 2);?> _TOTAL_ <?php echo explosion($language->translate('SHOW_ENTRY_CURRENT'), 3);?>",
+                        "infoEmpty": "<?php echo $language->translate('NO_ENTRIES');?>",
+                        "infoFiltered": "<?php echo explosion($language->translate('FILTERED'), 0);?> _MAX_ <?php echo explosion($language->translate('FILTERED'), 1);?>",
+                        "lengthMenu": "<?php echo $language->translate('SHOW');?> _MENU_ <?php echo $language->translate('ENTRIES');?>",
+                        "search": "<?php echo $language->translate('SEARCH');?>",
+                        "zeroRecords": "<?php echo $language->translate('NO_MATCHING');?>",
+                        "paginate": {
+				             "next": "<?php echo $language->translate('NEXT');?>",
+                            "previous": "<?php echo $language->translate('PREVIOUS');?>",
+				           }
+			         }
                 });
             });
         </script>
@@ -1937,6 +2078,8 @@ endif;
         
         $( document ).ready(function() {
             
+            
+            
             $( "div[class^='jFiler jFiler-theme-dragdropbox']" ).hide();
         		
         	$.ajax({
@@ -1946,7 +2089,7 @@ endif;
                 dataType: "json",
                 success: function(github) {
                    
-                    var currentVersion = "0.999";
+                    var currentVersion = "0.9998";
                     var githubVersion = github.tag_name;
                     var githubDescription = github.body;
                     var githubName = github.name;

+ 1 - 0
user.php

@@ -14,6 +14,7 @@
     if(!empty($databaseConfig['titleLogo'])) : define('TITLELOGO', $databaseConfig['titleLogo']); else : define('TITLELOGO', ''); endif;
     if(!empty($databaseConfig['loadingIcon'])) : define('LOADINGICON', $databaseConfig['loadingIcon']); else : define('LOADINGICON', ''); endif;
     define('FAIL_LOG', 'loginLog.json');
+    date_default_timezone_set(TIMEZONE);
 
 	class User
 	{