Details

    • Type: Improvement Improvement
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Labels:
      None

      Description

      It would be nice if you could support loading resources from a CDN. Google hosts everything
      at theirs for example.

      def resources = { attrs ->
      def theme = attrs.theme ?: 'ui-lightness'
      def plugin = pluginManager.getGrailsPlugin('jquery-ui')
      def jqver = plugin.instance.JQUERYUI_VERSION
      // If a plugin is using THIS plugin, if they change theme they need to be able
      // to specify their plugin name so we can load the theme!
      def plug = attrs.theme ? attrs.plugin : 'jqueryUi'
      if(attrs?.useGoogleCDN.equals("true")) {
      out << """<link href="http://ajax.googleapis.com/ajax/libs/jqueryui/$

      {jqver}/themes/${theme}/jquery-ui.min.css" type="text/css" rel="Stylesheet" />"""
      out << """<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/${jqver}

      /jquery-ui.min.js"></script>"""
      } else

      { def themedir = attrs.themeDir ? attrs.themeDir + '/' + theme : 'jquery-ui/themes/'+theme out << resourceLink(plugin: plug, type:'css', dir: themedir, file:'jquery-ui-'+jqver+'.custom.css', media:'screen, projection') out << resourceLink(plugin: 'jqueryUi', type:'js', dir:'jquery-ui/js', file:'jquery-ui-'+jqver+'.custom.min.js') }

      }

        Activity

        There are no comments yet on this issue.

          People

          • Assignee:
            Marc Palmer
            Reporter:
            Sebastian Hohns
          • Votes:
            1 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated: