Пример #1
0
 /**
  * .
  * @param mixed $args
  */
 public static function load($args)
 {
     try {
         $target = '#twitter-thread';
         $loader = '#twitter-loader';
         $data = array();
         if (is_array($args)) {
             if (array_key_exists('target', $args)) {
                 $target = $args['target'];
             }
             if (array_key_exists('loader', $args)) {
                 $loader = $args['loader'];
             }
             if (array_key_exists('data', $args)) {
                 foreach ($args['data'] as $opt => $value) {
                     array_push($data, "'" . $opt . "':'" . $value . "'");
                 }
             }
         }
         Plugins\jQuery::loadPlugin(self::DIR . self::JS);
         Plugins\jQuery::script("\$('" . $target . "').jLastTweet({" . implode(',', $data) . "}, '" . $loader . "');", true);
     } catch (Core\Exception $e) {
         throw $e;
     }
 }
Пример #2
0
 /**
  * .
  * @param mixed $args
  */
 public static function load($args)
 {
     try {
         Plugins\jQuery::loadPlugin(self::DIR . self::JS);
     } catch (Core\Exception $e) {
         throw $e;
     }
 }
Пример #3
0
 /**
  * Loads Sticky js/css files
  * @param mixed $args
  */
 public static function load(&$args)
 {
     try {
         Plugins\jQuery::loadPlugin(self::PLUGIN_DIR . self::PLUGIN_JS);
         Plugins\jQuery::loadCSS(self::PLUGIN_DIR . self::PLUGIN_CSS);
     } catch (Core\Exception $e) {
         throw $e;
     }
 }
Пример #4
0
 /**
  * Loads FancyBox js/css files and apply fancybox() to a[rel]'s
  * @param mixed $args
  */
 public static function load($args)
 {
     try {
         Plugins\jQuery::loadPlugin(self::FB_DIR . self::FB_JS);
         Plugins\jQuery::loadCSS(self::FB_DIR . self::FB_CSS);
         Plugins\jQuery::script("\n            \$('a[rel=fancybox-frame]').fancybox({\n                'width'\t\t\t\t: '50%',\n                'height'\t\t\t: '50%',\n                'autoScale'     \t: false,\n                'transitionIn'\t\t: 'none',\n                'transitionOut'\t\t: 'none',\n                'type'\t\t\t\t: 'iframe'\n            });\n            \$('a[rel=fancybox-image]').fancybox({\n                'transitionIn'\t\t: 'none',\n                'transitionOut'\t\t: 'none',\n                'titlePosition' \t: 'over'\n            });", true);
     } catch (Core\Exception $e) {
         throw $e;
     }
 }
Пример #5
0
 /**
  * Loads a new SyntaxHighlighter plugin from Alex Gorbatchev's public CDN
  * No args required
  * @param mixed $args
  */
 public static function load()
 {
     try {
         $theme = \Orion::config()->defined('SYNTAXHIGHLIGHTER_THEME') ? \Orion::config()->get('SYNTAXHIGHLIGHTER_THEME') : self::SH_THEME;
         Plugins\jQuery::loadPlugin(self::SH_DIR . 'scripts/shCore.js', true);
         Plugins\jQuery::loadPlugin(self::SH_DIR . 'scripts/shAutoloader.js', true);
         Plugins\jQuery::loadCSS($theme, true);
         Plugins\jQuery::script("\n            function path()\n            {\n              var args = arguments,\n                  result = []\n                  ;\n                   \n              for(var i = 0; i < args.length; i++)\n                  result.push(args[i].replace('@', '" . self::SH_DIR . "scripts/'));\n                   \n              return result\n            };\n             \n            SyntaxHighlighter.defaults['toolbar'] = false;\n\n            SyntaxHighlighter.autoloader.apply(null, path(\n              'applescript            @shBrushAppleScript.js',\n              'actionscript3 as3      @shBrushAS3.js',\n              'bash shell             @shBrushBash.js',\n              'coldfusion cf          @shBrushColdFusion.js',\n              'cpp c                  @shBrushCpp.js',\n              'c# c-sharp csharp      @shBrushCSharp.js',\n              'css                    @shBrushCss.js',\n              'delphi pascal          @shBrushDelphi.js',\n              'diff patch pas         @shBrushDiff.js',\n              'erl erlang             @shBrushErlang.js',\n              'groovy                 @shBrushGroovy.js',\n              'java                   @shBrushJava.js',\n              'jfx javafx             @shBrushJavaFX.js',\n              'js jscript javascript  @shBrushJScript.js',\n              'perl pl                @shBrushPerl.js',\n              'php                    @shBrushPhp.js',\n              'text plain             @shBrushPlain.js',\n              'py python              @shBrushPython.js',\n              'ruby rails ror rb      @shBrushRuby.js',\n              'sass scss              @shBrushSass.js',\n              'scala                  @shBrushScala.js',\n              'sql                    @shBrushSql.js',\n              'vb vbnet               @shBrushVb.js',\n              'xml xhtml xslt html    @shBrushXml.js'\n            ));\n            SyntaxHighlighter.all();", true);
     } catch (Core\Exception $e) {
         throw $e;
     }
 }