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.3.0 plugin/jquery_ui_theme.rb
tdiary-contrib-5.2.4 plugin/jquery_ui_theme.rb
tdiary-contrib-5.2.3 plugin/jquery_ui_theme.rb
tdiary-contrib-5.2.2 plugin/jquery_ui_theme.rb
tdiary-contrib-5.2.1 plugin/jquery_ui_theme.rb
tdiary-contrib-5.2.0 plugin/jquery_ui_theme.rb
tdiary-contrib-5.1.7 plugin/jquery_ui_theme.rb
tdiary-contrib-5.1.6 plugin/jquery_ui_theme.rb
tdiary-5.1.6 vendor/bundle/ruby/2.7.0/gems/tdiary-5.1.5/vendor/bundle/ruby/3.0.0/gems/tdiary-contrib-5.1.4/plugin/jquery_ui_theme.rb
tdiary-5.1.6 vendor/bundle/ruby/2.7.0/bundler/gems/tdiary-contrib-d1e41204db13/plugin/jquery_ui_theme.rb
tdiary-contrib-5.1.5 plugin/jquery_ui_theme.rb
tdiary-5.1.5 vendor/bundle/ruby/3.0.0/gems/tdiary-contrib-5.1.4/plugin/jquery_ui_theme.rb
tdiary-contrib-5.1.4 plugin/jquery_ui_theme.rb
tdiary-contrib-5.1.3 plugin/jquery_ui_theme.rb
tdiary-contrib-5.1.2 plugin/jquery_ui_theme.rb
tdiary-contrib-5.1.1 plugin/jquery_ui_theme.rb
tdiary-contrib-5.1.0 plugin/jquery_ui_theme.rb
tdiary-contrib-5.0.13 plugin/jquery_ui_theme.rb
tdiary-contrib-5.0.12 plugin/jquery_ui_theme.rb
tdiary-contrib-5.0.11 plugin/jquery_ui_theme.rb