]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/action.php
merge 0.9.x into 1.0.x
[quix0rs-gnu-social.git] / lib / action.php
index 5678344ca61718655e566603618b5544950a8bcf..3492873c5981574b7d29e71a08641759f901cca6 100644 (file)
@@ -309,6 +309,7 @@ class Action extends HTMLOutputter // lawsuit
                     $this->script('jquery.cookie.min.js');
                     $this->inlineScript('if (typeof window.JSON !== "object") { $.getScript("'.common_path('js/json2.min.js').'"); }');
                     $this->script('jquery.joverlay.min.js');
+                    $this->script('jquery.infieldlabel.min.js');
                 } else {
                     $this->script('jquery.js');
                     $this->script('jquery.form.js');
@@ -316,6 +317,7 @@ class Action extends HTMLOutputter // lawsuit
                     $this->script('jquery.cookie.js');
                     $this->inlineScript('if (typeof window.JSON !== "object") { $.getScript("'.common_path('js/json2.js').'"); }');
                     $this->script('jquery.joverlay.js');
+                    $this->script('jquery.infieldlabel.js');
                 }
 
                 Event::handle('EndShowJQueryScripts', array($this));
@@ -328,15 +330,14 @@ class Action extends HTMLOutputter // lawsuit
                     $this->script('util.js');
                     $this->script('xbImportNode.js');
                     $this->script('geometa.js');
-
                 }
-                $this->inlineScript('function _loadTagInput(init) { $.getScript("'.common_path('js/jquery.timers.js') .
-                    '"); $.getScript("'.common_path('js/jquery.tagInput.js').'", init); } var _peopletagAC = "' .
-
+                $this->inlineScript('var _peopletagAC = "' .
                     common_local_url('peopletagautocomplete') . '";');
                 $this->showScriptMessages();
                 // Frame-busting code to avoid clickjacking attacks.
-                $this->inlineScript('if (window.top !== window.self) { window.top.location.href = window.self.location.href; }');
+                if (common_config('javascript', 'bustframes')) {
+                    $this->inlineScript('if (window.top !== window.self) { window.top.location.href = window.self.location.href; }');
+                }
                 Event::handle('EndShowStatusNetScripts', array($this));
                 Event::handle('EndShowLaconicaScripts', array($this));
             }
@@ -351,7 +352,6 @@ class Action extends HTMLOutputter // lawsuit
      * events and appending to the array. Try to avoid adding strings that won't be used, as
      * they'll be added to HTML output.
      */
-
     function showScriptMessages()
     {
         $messages = array();
@@ -749,7 +749,6 @@ class Action extends HTMLOutputter // lawsuit
      *
      * @return nothing
      */
-
     function showProfileBlock()
     {
         if (common_logged_in()) {
@@ -1359,13 +1358,16 @@ class Action extends HTMLOutputter // lawsuit
      *
      * @return nothing
      */
-    function menuItem($url, $text, $title=null, $is_selected=false, $id=null)
+    function menuItem($url, $text, $title=null, $is_selected=false, $id=null, $class=null)
     {
         // Added @id to li for some control.
         // XXX: We might want to move this to htmloutputter.php
         $lattrs = array();
-        if ($is_selected) {
-            $lattrs['class'] = 'current';
+        if ($class !== null) {
+            $lattrs['class'] = $class;
+            if ($is_selected) {
+                $lattrs['class'] = trim('current ' . $lattrs['class']);
+            }
         }
 
         (is_null($id)) ? $lattrs : $lattrs['id'] = $id;