Sha256: 36e58306889db2c60dbb181ec0e5fb847488c25e54fde1334a6c57473461f2f7

Contents?: true

Size: 1.15 KB

Versions: 41

Compression:

Stored size: 1.15 KB

Contents

# -*- coding: utf-8 -*-
#
# jquery_ui.rb - use jQuery UI
#
# Copyright (C) 2012, tamoot <tamoot+tdiary@gmail.com>
# You can redistribute it and/or modify it under GPL.
#

#
# not support
#
return if feed?

add_header_proc do
   if /\A(?:form|preview|append|edit|update)\z/ =~ @mode

      themes   = @conf['jquery_ui.theme']
      if themes.nil? || theme == ''
         themes = 'base'
      end

      jquery_ui = ''
      jquery_ui << %Q|<link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1/themes/#{themes.downcase}/jquery-ui.css"/>\n|
      jquery_ui

   else
      ''

   end

end

add_conf_proc( 'jquery_ui_theme', 'jQuery UI Theme' ) do
   if @mode == 'saveconf' then
      @conf['jquery_ui.theme'] = @cgi.params['jquery_ui.theme'][0]

   end

   <<-HTML
   <h3 class="subtitle">Theme name</h3>
   <p><input name="jquery_ui.theme" value="#{h @conf['jquery_ui.theme']}" size="40"></p>
   <p>sample) blitzer, flick .. <a href="http://jqueryui.com/themeroller/">See JQuery UI Theme.</a></p>
   <p>default is <b>base</b>.</p>
   HTML

end


# Local Variables:
# mode: ruby
# indent-tabs-mode: t
# tab-width: 3
# ruby-indent-level: 3
# End:
# vim: ts=3

Version data entries

41 entries across 35 versions & 2 rubygems

Version Path
tdiary-contrib-5.0.10 plugin/jquery_ui_theme.rb
tdiary-contrib-5.0.9 plugin/jquery_ui_theme.rb
tdiary-contrib-5.0.8 plugin/jquery_ui_theme.rb
tdiary-contrib-5.0.7 plugin/jquery_ui_theme.rb
tdiary-contrib-5.0.6 plugin/jquery_ui_theme.rb
tdiary-contrib-5.0.5 plugin/jquery_ui_theme.rb
tdiary-5.0.5 vendor/bundle/bundler/gems/tdiary-contrib-a3c5f37278c4/plugin/jquery_ui_theme.rb
tdiary-5.0.5 vendor/bundle/bundler/gems/tdiary-contrib-8299b30cbf3f/plugin/jquery_ui_theme.rb
tdiary-5.0.5 vendor/bundle/gems/tdiary-5.0.4/vendor/bundle/bundler/gems/tdiary-contrib-8299b30cbf3f/plugin/jquery_ui_theme.rb
tdiary-5.0.5 vendor/bundle/bundler/gems/tdiary-contrib-fa9c20aa0d97/plugin/jquery_ui_theme.rb
tdiary-5.0.5 vendor/bundle/bundler/gems/tdiary-contrib-f08988dfa0f6/plugin/jquery_ui_theme.rb
tdiary-contrib-5.0.4 plugin/jquery_ui_theme.rb
tdiary-5.0.4 vendor/bundle/bundler/gems/tdiary-contrib-8299b30cbf3f/plugin/jquery_ui_theme.rb
tdiary-contrib-5.0.3 plugin/jquery_ui_theme.rb
tdiary-contrib-5.0.2 plugin/jquery_ui_theme.rb
tdiary-contrib-5.0.1 plugin/jquery_ui_theme.rb
tdiary-contrib-5.0.0 plugin/jquery_ui_theme.rb
tdiary-contrib-4.2.1 plugin/jquery_ui_theme.rb
tdiary-4.2.1 vendor/bundle/ruby/2.2.0/bundler/gems/tdiary-contrib-2ab36447ae2a/plugin/jquery_ui_theme.rb
tdiary-4.2.1 vendor/bundle/ruby/2.3.0/bundler/gems/tdiary-contrib-d189eb6688f1/plugin/jquery_ui_theme.rb