public function InfiniteScrollFilter($paginate, $containerSelector = null, $itemSelector = null, $loadingMessage = null, $loadingImage = null, $finishedMessage = null)
 {
     if (!$containerSelector || !$itemSelector) {
         return null;
     }
     $content = '';
     if ($paginate->getNextUrl()) {
         $content .= '<div class="pagination"><a href="' . $paginate->getNextUrl() . '">Next Page</a></div>';
     }
     $content .= craft()->templates->includeJsResource('infinitescroll/js/jquery.infinitescroll.min.js');
     $script = 'var totalNumOfPages = ' . $paginate->totalPages . ';';
     $script .= 'var containerSelector = "' . $containerSelector . '";';
     $script .= 'var itemSelector = "' . $itemSelector . '";';
     $loadingImage = $loadingImage ? $loadingImage : UrlHelper::getResourceUrl('infinitescroll/img/ajax-loader.gif');
     $script .= 'var loadingImage = "' . $loadingImage . '";';
     if ($loadingMessage) {
         $script .= 'var loadingMessage = "' . $loadingMessage . '";';
     }
     if ($finishedMessage) {
         $script .= 'var finishedMessage = "' . $finishedMessage . '";';
     }
     $content .= craft()->templates->includeJs($script);
     $content .= craft()->templates->includeJsResource('infinitescroll/js/infinitescroll.js');
     return $content;
 }
Esempio n. 2
0
 /**
  * Get Icon URL
  *
  * @return string
  */
 public function getIconUrl()
 {
     return UrlHelper::getResourceUrl('oauth/providers/vimeo.svg');
 }
Esempio n. 3
0
 /**
  * Get Icon URL
  *
  * @return string
  */
 public function getIconUrl()
 {
     return UrlHelper::getResourceUrl('github/icon.svg');
 }
Esempio n. 4
0
 /**
  * Get Icon URL
  *
  * @return string
  */
 public function getIconUrl()
 {
     return UrlHelper::getResourceUrl('linkedin/svg/linkedin.svg');
 }
Esempio n. 5
0
 /**
  * Returns the provider's icon URL.
  *
  * @return string
  */
 public function getIconUrl()
 {
     return UrlHelper::getResourceUrl('instagram/icon.svg');
 }
 public function block_foot($context, array $blocks = array())
 {
     // line 37
     echo "\t<noscript>\n\t\t<div class=\"message-container no-access\">\n\t\t\t<div class=\"pane notice\">\n\t\t\t\t<p>";
     // line 40
     echo twig_escape_filter($this->env, \Craft\Craft::t("JavaScript must be enabled to access the Craft control panel."), "html", null, true);
     echo "</p>\n\t\t\t</div>\n\t\t</div>\n\t</noscript>\n\n\t<script type=\"text/javascript\">\n\t\twindow.Craft = {\n\t\t\tsiteUid:              \"";
     // line 47
     echo twig_escape_filter($this->env, twig_escape_filter($this->env, $this->getAttribute($this->getAttribute($this->getContext($context, "craft"), "app"), "getSiteUid", array(), "method"), "js"), "html", null, true);
     echo "\",\n\t\t\tbaseUrl:              \"";
     // line 48
     echo twig_escape_filter($this->env, twig_escape_filter($this->env, \Craft\UrlHelper::getUrl(), "js"), "html", null, true);
     echo "\",\n\t\t\tbaseCpUrl:            \"";
     // line 49
     echo twig_escape_filter($this->env, twig_escape_filter($this->env, \Craft\UrlHelper::getCpUrl(), "js"), "html", null, true);
     echo "\",\n\t\t\tbaseSiteUrl:          \"";
     // line 50
     echo twig_escape_filter($this->env, twig_escape_filter($this->env, \Craft\UrlHelper::getSiteUrl(), "js"), "html", null, true);
     echo "\",\n\t\t\tactionUrl:            \"";
     // line 51
     echo twig_escape_filter($this->env, twig_escape_filter($this->env, \Craft\UrlHelper::getActionUrl(), "js"), "html", null, true);
     echo "\",\n\t\t\tresourceUrl:          \"";
     // line 52
     echo twig_escape_filter($this->env, twig_escape_filter($this->env, \Craft\UrlHelper::getResourceUrl(), "js"), "html", null, true);
     echo "\",\n\t\t\tscriptName:           \"";
     // line 53
     echo twig_escape_filter($this->env, twig_escape_filter($this->env, $this->getAttribute($this->getAttribute($this->getContext($context, "craft"), "request"), "getScriptName", array(), "method"), "js"), "html", null, true);
     echo "\",\n\t\t\tomitScriptNameInUrls: ";
     // line 54
     echo $this->getAttribute($this->getAttribute($this->getContext($context, "craft"), "config"), "omitScriptNameInUrls", array(), "method") ? "true" : "false";
     echo ",\n\t\t\tusePathInfo:          ";
     // line 55
     echo $this->getAttribute($this->getAttribute($this->getContext($context, "craft"), "config"), "usePathInfo", array(), "method") ? "true" : "false";
     echo ",\n\t\t\tresourceTrigger:      \"";
     // line 56
     echo twig_escape_filter($this->env, twig_escape_filter($this->env, $this->getAttribute($this->getAttribute($this->getContext($context, "craft"), "config"), "getResourceTrigger", array(), "method"), "js"), "html", null, true);
     echo "\",\n\t\t\tactionTrigger:        \"";
     // line 57
     echo twig_escape_filter($this->env, twig_escape_filter($this->env, $this->getAttribute($this->getAttribute($this->getContext($context, "craft"), "config"), "actionTrigger"), "js"), "html", null, true);
     echo "\",\n\t\t\tpath:                 \"";
     // line 58
     echo twig_escape_filter($this->env, twig_escape_filter($this->env, $this->getAttribute($this->getAttribute($this->getContext($context, "craft"), "request"), "getPath", array(), "method"), "js"), "html", null, true);
     echo "\",\n\t\t\tlocale:               \"";
     // line 59
     echo twig_escape_filter($this->env, twig_escape_filter($this->env, $this->getAttribute($this->getContext($context, "craft"), "locale"), "js"), "html", null, true);
     echo "\",\n\t\t\torientation:          \"";
     // line 60
     echo twig_escape_filter($this->env, twig_escape_filter($this->env, $this->getContext($context, "orientation"), "js"), "html", null, true);
     echo "\",\n\t\t\tleft:                 \"";
     // line 61
     echo $this->getContext($context, "orientation") == "ltr" ? "left" : "right";
     echo "\",\n\t\t\tright:                \"";
     // line 62
     echo $this->getContext($context, "orientation") == "ltr" ? "right" : "left";
     echo "\",\n\t\t\tPersonal:             ";
     // line 63
     echo twig_escape_filter($this->env, $this->getContext($context, "CraftPersonal"), "html", null, true);
     echo ",\n\t\t\tClient:               ";
     // line 64
     echo twig_escape_filter($this->env, $this->getContext($context, "CraftClient"), "html", null, true);
     echo ",\n\t\t\tPro:                  ";
     // line 65
     echo twig_escape_filter($this->env, $this->getContext($context, "CraftPro"), "html", null, true);
     echo ",\n\t\t\tedition:              ";
     // line 66
     echo twig_escape_filter($this->env, $this->getContext($context, "CraftEdition"), "html", null, true);
     echo ",\n\t\t\tisLocalized:          ";
     // line 67
     echo $this->getAttribute($this->getContext($context, "craft"), "isLocalized", array(), "method") ? "true" : "false";
     echo ",\n\t\t\ttranslations:         ";
     // line 68
     echo \Craft\craft()->templates->getTranslations();
     echo ",\n\t\t\tmaxUploadSize:        ";
     // line 69
     echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute($this->getContext($context, "craft"), "app"), "getMaxUploadSize", array(), "method"), "html", null, true);
     echo ",\n\t\t\tslugWordSeparator:    \"";
     // line 70
     echo twig_escape_filter($this->env, twig_escape_filter($this->env, $this->getAttribute($this->getAttribute($this->getContext($context, "craft"), "config"), "slugWordSeparator"), "js"), "html", null, true);
     echo "\"\n\t\t};\n\n\t\twindow.Craft.fileKinds = {};\n\t\t";
     // line 74
     $context['_parent'] = (array) $context;
     $context['_seq'] = twig_ensure_traversable($this->getAttribute($this->getAttribute($this->getContext($context, "craft"), "app"), "getFileKinds", array(), "method"));
     foreach ($context['_seq'] as $context["kind"] => $context["info"]) {
         // line 75
         echo "\t\t\twindow.Craft.fileKinds.";
         echo twig_escape_filter($this->env, $this->getContext($context, "kind"), "html", null, true);
         echo " = [];\n\t\t\t";
         // line 76
         $context['_parent'] = (array) $context;
         $context['_seq'] = twig_ensure_traversable($this->getAttribute($this->getContext($context, "info"), "extensions"));
         foreach ($context['_seq'] as $context["_key"] => $context["extension"]) {
             // line 77
             echo "\t\t\t\twindow.Craft.fileKinds.";
             echo twig_escape_filter($this->env, $this->getContext($context, "kind"), "html", null, true);
             echo ".push(\"";
             echo twig_escape_filter($this->env, $this->getContext($context, "extension"), "html", null, true);
             echo "\");\n\t\t\t";
         }
         $_parent = $context['_parent'];
         unset($context['_seq'], $context['_iterated'], $context['_key'], $context['extension'], $context['_parent'], $context['loop']);
         $context = array_intersect_key($context, $_parent) + $_parent;
         // line 79
         echo "\t\t";
     }
     $_parent = $context['_parent'];
     unset($context['_seq'], $context['_iterated'], $context['kind'], $context['info'], $context['_parent'], $context['loop']);
     $context = array_intersect_key($context, $_parent) + $_parent;
     // line 80
     echo "\t</script>\n";
 }