compass-jquery-plugin 0.3.0.0 → 0.3.1.beta.2
Sign up to get free protection for your applications and to get access to all the features.
- data/README.textile +69 -13
- data/Rakefile +1 -1
- data/VERSION.yml +2 -2
- data/gem_tasks/jqgrid.rake +119 -0
- data/gem_tasks/jrails.rake +78 -77
- data/gem_tasks/mobile.rake +156 -0
- data/gem_tasks/rubygems.rake +5 -1
- data/gem_tasks/secret_sauce.rake +64 -0
- data/lib/jquery/gridify.rb +42 -0
- data/lib/jquery/gridify/assertions.rb +37 -0
- data/lib/jquery/gridify/grid.rb +210 -0
- data/lib/jquery/gridify/grid_column.rb +134 -0
- data/lib/jquery/gridify/grid_finder.rb +223 -0
- data/lib/jquery/gridify/grid_options.rb +279 -0
- data/lib/jquery/gridify/grid_view.rb +435 -0
- data/lib/jquery/jqgrid.rb +5 -0
- data/lib/jquery/jqgrid/jqgrid.rb +438 -0
- data/lib/jquery/mobile.rb +3 -0
- data/lib/jquery/secret_sauce.rb +9 -0
- data/lib/jquery/secret_sauce/controller/ui_dialog_controls.rb +14 -0
- data/lib/jquery/secret_sauce/controller/ui_grid_controls.rb +18 -0
- data/lib/jquery/secret_sauce/helpers/ui_dialog_helper.rb +6 -0
- data/lib/jquery/secret_sauce/helpers/ui_form_helper.rb +118 -0
- data/lib/jquery/secret_sauce/helpers/ui_grid_helper.rb +226 -0
- data/lib/jquery/secret_sauce/model/find_for_grid.rb +42 -0
- data/templates/dynatree/jquery.dynatree.js +258 -147
- data/templates/dynatree/jquery.dynatree.min.js +81 -79
- data/templates/dynatree/jquery/dynatree/aero.scss +35 -18
- data/templates/dynatree/jquery/dynatree/aero/drop_sibling_here.png +0 -0
- data/templates/dynatree/jquery/dynatree/aqua.scss +36 -19
- data/templates/dynatree/jquery/dynatree/aqua/drop_sibling_here.png +0 -0
- data/templates/dynatree/jquery/dynatree/crystal.scss +38 -21
- data/templates/dynatree/jquery/dynatree/crystal/drop_sibling_here.png +0 -0
- data/templates/dynatree/jquery/dynatree/xp.scss +59 -42
- data/templates/dynatree/jquery/dynatree/xp/drop_sibling_here.png +0 -0
- data/templates/dynatree/manifest.rb +4 -0
- data/templates/jqgrid/config/initializers/jqgrid.rb +4 -0
- data/templates/jqgrid/config/locales/jquery/jqgrid/de.yml +7 -0
- data/templates/jqgrid/config/locales/jquery/jqgrid/en.yml +7 -0
- data/templates/jqgrid/i18n/jqgrid/locale-bg.js +132 -0
- data/templates/jqgrid/i18n/jqgrid/locale-bg.min.js +6 -0
- data/templates/jqgrid/i18n/jqgrid/locale-bg1251.js +132 -0
- data/templates/jqgrid/i18n/jqgrid/locale-bg1251.min.js +6 -0
- data/templates/jqgrid/i18n/jqgrid/locale-cat.js +128 -0
- data/templates/jqgrid/i18n/jqgrid/locale-cat.min.js +6 -0
- data/templates/jqgrid/i18n/jqgrid/locale-cn.js +132 -0
- data/templates/jqgrid/i18n/jqgrid/locale-cn.min.js +5 -0
- data/templates/jqgrid/i18n/jqgrid/locale-cs.js +128 -0
- data/templates/jqgrid/i18n/jqgrid/locale-cs.min.js +6 -0
- data/templates/jqgrid/i18n/jqgrid/locale-da.js +128 -0
- data/templates/jqgrid/i18n/jqgrid/locale-da.min.js +6 -0
- data/templates/jqgrid/i18n/jqgrid/locale-de.js +133 -0
- data/templates/jqgrid/i18n/jqgrid/locale-de.min.js +7 -0
- data/templates/jqgrid/i18n/jqgrid/locale-el.js +126 -0
- data/templates/jqgrid/i18n/jqgrid/locale-el.min.js +7 -0
- data/templates/jqgrid/i18n/jqgrid/locale-en.js +128 -0
- data/templates/jqgrid/i18n/jqgrid/locale-en.min.js +6 -0
- data/templates/jqgrid/i18n/jqgrid/locale-es.js +128 -0
- data/templates/jqgrid/i18n/jqgrid/locale-es.min.js +7 -0
- data/templates/jqgrid/i18n/jqgrid/locale-fa.js +125 -0
- data/templates/jqgrid/i18n/jqgrid/locale-fa.min.js +6 -0
- data/templates/jqgrid/i18n/jqgrid/locale-fi.js +130 -0
- data/templates/jqgrid/i18n/jqgrid/locale-fi.min.js +6 -0
- data/templates/jqgrid/i18n/jqgrid/locale-fr.js +126 -0
- data/templates/jqgrid/i18n/jqgrid/locale-fr.min.js +7 -0
- data/templates/jqgrid/i18n/jqgrid/locale-gl.js +126 -0
- data/templates/jqgrid/i18n/jqgrid/locale-gl.min.js +7 -0
- data/templates/jqgrid/i18n/jqgrid/locale-he.js +127 -0
- data/templates/jqgrid/i18n/jqgrid/locale-he.min.js +6 -0
- data/templates/jqgrid/i18n/jqgrid/locale-hu.js +129 -0
- data/templates/jqgrid/i18n/jqgrid/locale-hu.min.js +6 -0
- data/templates/jqgrid/i18n/jqgrid/locale-is.js +126 -0
- data/templates/jqgrid/i18n/jqgrid/locale-is.min.js +6 -0
- data/templates/jqgrid/i18n/jqgrid/locale-it.js +1 -0
- data/templates/jqgrid/i18n/jqgrid/locale-it.min.js +7 -0
- data/templates/jqgrid/i18n/jqgrid/locale-ja.js +155 -0
- data/templates/jqgrid/i18n/jqgrid/locale-ja.min.js +5 -0
- data/templates/jqgrid/i18n/jqgrid/locale-nl.js +149 -0
- data/templates/jqgrid/i18n/jqgrid/locale-nl.min.js +6 -0
- data/templates/jqgrid/i18n/jqgrid/locale-no.js +1 -0
- data/templates/jqgrid/i18n/jqgrid/locale-no.min.js +6 -0
- data/templates/jqgrid/i18n/jqgrid/locale-pl.js +127 -0
- data/templates/jqgrid/i18n/jqgrid/locale-pl.min.js +6 -0
- data/templates/jqgrid/i18n/jqgrid/locale-pt-br.js +127 -0
- data/templates/jqgrid/i18n/jqgrid/locale-pt-br.min.js +6 -0
- data/templates/jqgrid/i18n/jqgrid/locale-pt.js +125 -0
- data/templates/jqgrid/i18n/jqgrid/locale-pt.min.js +6 -0
- data/templates/jqgrid/i18n/jqgrid/locale-ro.js +139 -0
- data/templates/jqgrid/i18n/jqgrid/locale-ro.min.js +7 -0
- data/templates/jqgrid/i18n/jqgrid/locale-ru.js +127 -0
- data/templates/jqgrid/i18n/jqgrid/locale-ru.min.js +7 -0
- data/templates/jqgrid/i18n/jqgrid/locale-sk.js +127 -0
- data/templates/jqgrid/i18n/jqgrid/locale-sk.min.js +6 -0
- data/templates/jqgrid/i18n/jqgrid/locale-sr.js +128 -0
- data/templates/jqgrid/i18n/jqgrid/locale-sr.min.js +6 -0
- data/templates/jqgrid/i18n/jqgrid/locale-sv.js +127 -0
- data/templates/jqgrid/i18n/jqgrid/locale-sv.min.js +6 -0
- data/templates/jqgrid/i18n/jqgrid/locale-tr.js +126 -0
- data/templates/jqgrid/i18n/jqgrid/locale-tr.min.js +6 -0
- data/templates/jqgrid/i18n/jqgrid/locale-ua.js +127 -0
- data/templates/jqgrid/i18n/jqgrid/locale-ua.min.js +7 -0
- data/templates/jqgrid/jquery.jqGrid.js +11604 -0
- data/templates/jqgrid/jquery.jqGrid.min.js +472 -0
- data/templates/jqgrid/jquery/jqGrid.scss +692 -0
- data/templates/jqgrid/manifest.rb +72 -0
- data/templates/jqgrid/public/stylesheets/ellipsis-xbl.xml +13 -0
- data/templates/jqtouch/jquery/touch/apple.scss +5 -5
- data/templates/jqtouch/jquery/touch/default.scss +5 -5
- data/templates/jqtouch/jquery/touch/jqt.scss +5 -5
- data/templates/jrails/config/initializers/jrails.rb +3 -0
- data/templates/jrails/jquery-ui.js +45 -62
- data/templates/jrails/jquery-ui.min.js +22 -22
- data/templates/jrails/jquery.js +340 -206
- data/templates/jrails/jquery.min.js +152 -151
- data/templates/jrails/jquery.tmpl.js +489 -0
- data/templates/jrails/jquery.tmpl.min.js +12 -0
- data/templates/jrails/jquery.tmplPlus.js +98 -0
- data/templates/jrails/jquery.tmplPlus.min.js +3 -0
- data/templates/jrails/jquery/ui/_theme.scss +3 -1
- data/templates/jrails/manifest.rb +4 -0
- data/templates/jstree/jquery.jstree.js +4479 -4468
- data/templates/jstree/jquery.jstree.min.js +4 -3
- data/templates/mobile/config/initializers/mobile.rb +6 -0
- data/templates/mobile/glyphish/Read me first - license.txt +14 -0
- data/templates/mobile/glyphish/icons-black/01-refresh.png +0 -0
- data/templates/mobile/glyphish/icons-black/02-redo.png +0 -0
- data/templates/mobile/glyphish/icons-black/03-loopback.png +0 -0
- data/templates/mobile/glyphish/icons-black/04-squiggle.png +0 -0
- data/templates/mobile/glyphish/icons-black/05-shuffle.png +0 -0
- data/templates/mobile/glyphish/icons-black/06-magnifying-glass.png +0 -0
- data/templates/mobile/glyphish/icons-black/07-map-marker.png +0 -0
- data/templates/mobile/glyphish/icons-black/08-chat.png +0 -0
- data/templates/mobile/glyphish/icons-black/09-chat2.png +0 -0
- data/templates/mobile/glyphish/icons-black/10-medical.png +0 -0
- data/templates/mobile/glyphish/icons-black/100-coffee.png +0 -0
- data/templates/mobile/glyphish/icons-black/101-gameplan.png +0 -0
- data/templates/mobile/glyphish/icons-black/102-walk.png +0 -0
- data/templates/mobile/glyphish/icons-black/103-map.png +0 -0
- data/templates/mobile/glyphish/icons-black/104-index-cards.png +0 -0
- data/templates/mobile/glyphish/icons-black/105-piano.png +0 -0
- data/templates/mobile/glyphish/icons-black/106-sliders.png +0 -0
- data/templates/mobile/glyphish/icons-black/107-widescreen.png +0 -0
- data/templates/mobile/glyphish/icons-black/108-badge.png +0 -0
- data/templates/mobile/glyphish/icons-black/109-chicken.png +0 -0
- data/templates/mobile/glyphish/icons-black/11-clock.png +0 -0
- data/templates/mobile/glyphish/icons-black/110-bug.png +0 -0
- data/templates/mobile/glyphish/icons-black/111-user.png +0 -0
- data/templates/mobile/glyphish/icons-black/112-group.png +0 -0
- data/templates/mobile/glyphish/icons-black/113-navigation.png +0 -0
- data/templates/mobile/glyphish/icons-black/114-balloon.png +0 -0
- data/templates/mobile/glyphish/icons-black/115-bow-and-arrow.png +0 -0
- data/templates/mobile/glyphish/icons-black/116-controller.png +0 -0
- data/templates/mobile/glyphish/icons-black/117-todo.png +0 -0
- data/templates/mobile/glyphish/icons-black/118-coathanger.png +0 -0
- data/templates/mobile/glyphish/icons-black/119-piggybank.png +0 -0
- data/templates/mobile/glyphish/icons-black/12-eye.png +0 -0
- data/templates/mobile/glyphish/icons-black/120-headphones.png +0 -0
- data/templates/mobile/glyphish/icons-black/121-lanscape.png +0 -0
- data/templates/mobile/glyphish/icons-black/122-stats.png +0 -0
- data/templates/mobile/glyphish/icons-black/123-id-card.png +0 -0
- data/templates/mobile/glyphish/icons-black/124-bullhorn.png +0 -0
- data/templates/mobile/glyphish/icons-black/125-food.png +0 -0
- data/templates/mobile/glyphish/icons-black/126-moon.png +0 -0
- data/templates/mobile/glyphish/icons-black/127-sock.png +0 -0
- data/templates/mobile/glyphish/icons-black/128-bone.png +0 -0
- data/templates/mobile/glyphish/icons-black/129-golf.png +0 -0
- data/templates/mobile/glyphish/icons-black/13-target.png +0 -0
- data/templates/mobile/glyphish/icons-black/130-dice.png +0 -0
- data/templates/mobile/glyphish/icons-black/14-tag.png +0 -0
- data/templates/mobile/glyphish/icons-black/15-tags.png +0 -0
- data/templates/mobile/glyphish/icons-black/16-line-chart.png +0 -0
- data/templates/mobile/glyphish/icons-black/17-bar-chart.png +0 -0
- data/templates/mobile/glyphish/icons-black/18-envelope.png +0 -0
- data/templates/mobile/glyphish/icons-black/19-gear.png +0 -0
- data/templates/mobile/glyphish/icons-black/20-gear2.png +0 -0
- data/templates/mobile/glyphish/icons-black/21-skull.png +0 -0
- data/templates/mobile/glyphish/icons-black/22-skull-n-crossbones.png +0 -0
- data/templates/mobile/glyphish/icons-black/23-bird.png +0 -0
- data/templates/mobile/glyphish/icons-black/24-gift.png +0 -0
- data/templates/mobile/glyphish/icons-black/25-weather.png +0 -0
- data/templates/mobile/glyphish/icons-black/26-bandaid.png +0 -0
- data/templates/mobile/glyphish/icons-black/27-planet.png +0 -0
- data/templates/mobile/glyphish/icons-black/28-star.png +0 -0
- data/templates/mobile/glyphish/icons-black/29-heart.png +0 -0
- data/templates/mobile/glyphish/icons-black/30-key.png +0 -0
- data/templates/mobile/glyphish/icons-black/31-ipod.png +0 -0
- data/templates/mobile/glyphish/icons-black/32-iphone.png +0 -0
- data/templates/mobile/glyphish/icons-black/33-cabinet.png +0 -0
- data/templates/mobile/glyphish/icons-black/34-coffee.png +0 -0
- data/templates/mobile/glyphish/icons-black/35-shopping-bag.png +0 -0
- data/templates/mobile/glyphish/icons-black/36-toolbox.png +0 -0
- data/templates/mobile/glyphish/icons-black/37-suitcase.png +0 -0
- data/templates/mobile/glyphish/icons-black/38-airplane.png +0 -0
- data/templates/mobile/glyphish/icons-black/39-spraycan.png +0 -0
- data/templates/mobile/glyphish/icons-black/40-inbox.png +0 -0
- data/templates/mobile/glyphish/icons-black/41-picture-frame.png +0 -0
- data/templates/mobile/glyphish/icons-black/42-photos.png +0 -0
- data/templates/mobile/glyphish/icons-black/43-film-roll.png +0 -0
- data/templates/mobile/glyphish/icons-black/44-shoebox.png +0 -0
- data/templates/mobile/glyphish/icons-black/45-movie1.png +0 -0
- data/templates/mobile/glyphish/icons-black/46-movie2.png +0 -0
- data/templates/mobile/glyphish/icons-black/47-fuel.png +0 -0
- data/templates/mobile/glyphish/icons-black/48-fork-and-knife.png +0 -0
- data/templates/mobile/glyphish/icons-black/49-battery.png +0 -0
- data/templates/mobile/glyphish/icons-black/50-beaker.png +0 -0
- data/templates/mobile/glyphish/icons-black/51-outlet.png +0 -0
- data/templates/mobile/glyphish/icons-black/52-pinetree.png +0 -0
- data/templates/mobile/glyphish/icons-black/53-house.png +0 -0
- data/templates/mobile/glyphish/icons-black/54-lock.png +0 -0
- data/templates/mobile/glyphish/icons-black/55-network.png +0 -0
- data/templates/mobile/glyphish/icons-black/56-cloud.png +0 -0
- data/templates/mobile/glyphish/icons-black/57-download.png +0 -0
- data/templates/mobile/glyphish/icons-black/58-bookmark.png +0 -0
- data/templates/mobile/glyphish/icons-black/59-flag.png +0 -0
- data/templates/mobile/glyphish/icons-black/60-signpost.png +0 -0
- data/templates/mobile/glyphish/icons-black/61-brightness.png +0 -0
- data/templates/mobile/glyphish/icons-black/62-contrast.png +0 -0
- data/templates/mobile/glyphish/icons-black/63-runner.png +0 -0
- data/templates/mobile/glyphish/icons-black/64-zap.png +0 -0
- data/templates/mobile/glyphish/icons-black/65-note.png +0 -0
- data/templates/mobile/glyphish/icons-black/66-microphone.png +0 -0
- data/templates/mobile/glyphish/icons-black/67-tshirt.png +0 -0
- data/templates/mobile/glyphish/icons-black/68-paperclip.png +0 -0
- data/templates/mobile/glyphish/icons-black/69-display.png +0 -0
- data/templates/mobile/glyphish/icons-black/70-tv.png +0 -0
- data/templates/mobile/glyphish/icons-black/71-compass.png +0 -0
- data/templates/mobile/glyphish/icons-black/72-pin.png +0 -0
- data/templates/mobile/glyphish/icons-black/73-radar.png +0 -0
- data/templates/mobile/glyphish/icons-black/74-location.png +0 -0
- data/templates/mobile/glyphish/icons-black/75-phone.png +0 -0
- data/templates/mobile/glyphish/icons-black/76-baby.png +0 -0
- data/templates/mobile/glyphish/icons-black/77-ekg.png +0 -0
- data/templates/mobile/glyphish/icons-black/78-stopwatch.png +0 -0
- data/templates/mobile/glyphish/icons-black/79-medical-bag.png +0 -0
- data/templates/mobile/glyphish/icons-black/80-shopping-cart.png +0 -0
- data/templates/mobile/glyphish/icons-black/81-dashboard.png +0 -0
- data/templates/mobile/glyphish/icons-black/82-dogpaw.png +0 -0
- data/templates/mobile/glyphish/icons-black/83-calendar.png +0 -0
- data/templates/mobile/glyphish/icons-black/84-lightbulb.png +0 -0
- data/templates/mobile/glyphish/icons-black/85-trophy.png +0 -0
- data/templates/mobile/glyphish/icons-black/86-camera.png +0 -0
- data/templates/mobile/glyphish/icons-black/87-wineglass.png +0 -0
- data/templates/mobile/glyphish/icons-black/88-beermug.png +0 -0
- data/templates/mobile/glyphish/icons-black/89-dumbbell.png +0 -0
- data/templates/mobile/glyphish/icons-black/90-lifebuoy.png +0 -0
- data/templates/mobile/glyphish/icons-black/91-beaker2.png +0 -0
- data/templates/mobile/glyphish/icons-black/92-testtube.png +0 -0
- data/templates/mobile/glyphish/icons-black/93-thermometer.png +0 -0
- data/templates/mobile/glyphish/icons-black/94-pill.png +0 -0
- data/templates/mobile/glyphish/icons-black/95-equalizer.png +0 -0
- data/templates/mobile/glyphish/icons-black/96-book.png +0 -0
- data/templates/mobile/glyphish/icons-black/97-puzzle.png +0 -0
- data/templates/mobile/glyphish/icons-black/98-palette.png +0 -0
- data/templates/mobile/glyphish/icons-black/99-umbrella.png +0 -0
- data/templates/mobile/glyphish/icons-white/09-chat2.png +0 -0
- data/templates/mobile/glyphish/icons-white/100-coffee.png +0 -0
- data/templates/mobile/glyphish/icons-white/18-envelope.png +0 -0
- data/templates/mobile/glyphish/icons-white/19-gear.png +0 -0
- data/templates/mobile/glyphish/icons-white/21-skull.png +0 -0
- data/templates/mobile/glyphish/icons-white/30-key.png +0 -0
- data/templates/mobile/glyphish/icons-white/34-coffee.png +0 -0
- data/templates/mobile/glyphish/icons-white/88-beermug.png +0 -0
- data/templates/mobile/glyphish/mini-icons-black/band-aid.png +0 -0
- data/templates/mobile/glyphish/mini-icons-black/chat.png +0 -0
- data/templates/mobile/glyphish/mini-icons-black/clock.png +0 -0
- data/templates/mobile/glyphish/mini-icons-black/eye.png +0 -0
- data/templates/mobile/glyphish/mini-icons-black/flag.png +0 -0
- data/templates/mobile/glyphish/mini-icons-black/fork-and-knife.png +0 -0
- data/templates/mobile/glyphish/mini-icons-black/gear.png +0 -0
- data/templates/mobile/glyphish/mini-icons-black/heart.png +0 -0
- data/templates/mobile/glyphish/mini-icons-black/lightning-bolt.png +0 -0
- data/templates/mobile/glyphish/mini-icons-black/magnifying-glass.png +0 -0
- data/templates/mobile/glyphish/mini-icons-black/map-marker.png +0 -0
- data/templates/mobile/glyphish/mini-icons-black/map-pin.png +0 -0
- data/templates/mobile/glyphish/mini-icons-black/microphone.png +0 -0
- data/templates/mobile/glyphish/mini-icons-black/music-note.png +0 -0
- data/templates/mobile/glyphish/mini-icons-black/paw.png +0 -0
- data/templates/mobile/glyphish/mini-icons-black/plus.png +0 -0
- data/templates/mobile/glyphish/mini-icons-black/puzzle.png +0 -0
- data/templates/mobile/glyphish/mini-icons-black/star.png +0 -0
- data/templates/mobile/glyphish/mini-icons-black/tag.png +0 -0
- data/templates/mobile/glyphish/mini-icons-black/tshirt.png +0 -0
- data/templates/mobile/jquery.mobile.js +3995 -0
- data/templates/mobile/jquery.mobile.min.js +28 -0
- data/templates/mobile/jquery/mobile/_base.scss +1344 -0
- data/templates/mobile/jquery/mobile/default.scss +745 -0
- data/templates/mobile/jquery/mobile/default/ajax-loader.png +0 -0
- data/templates/mobile/jquery/mobile/default/form-check-off.png +0 -0
- data/templates/mobile/jquery/mobile/default/form-check-on.png +0 -0
- data/templates/mobile/jquery/mobile/default/form-radio-off.png +0 -0
- data/templates/mobile/jquery/mobile/default/form-radio-on.png +0 -0
- data/templates/mobile/jquery/mobile/default/icon-search-black.png +0 -0
- data/templates/mobile/jquery/mobile/default/icons-18-black.png +0 -0
- data/templates/mobile/jquery/mobile/default/icons-18-white.png +0 -0
- data/templates/mobile/jquery/mobile/default/icons-36-black.png +0 -0
- data/templates/mobile/jquery/mobile/default/icons-36-white.png +0 -0
- data/templates/mobile/jquery/mobile/valencia.scss +807 -0
- data/templates/mobile/jquery/mobile/valencia/ajax-loader.png +0 -0
- data/templates/mobile/jquery/mobile/valencia/form-check-off.png +0 -0
- data/templates/mobile/jquery/mobile/valencia/form-check-on.png +0 -0
- data/templates/mobile/jquery/mobile/valencia/form-radio-off.png +0 -0
- data/templates/mobile/jquery/mobile/valencia/form-radio-on.png +0 -0
- data/templates/mobile/jquery/mobile/valencia/icon-search-black.png +0 -0
- data/templates/mobile/jquery/mobile/valencia/icons-18-black.png +0 -0
- data/templates/mobile/jquery/mobile/valencia/icons-18-white.png +0 -0
- data/templates/mobile/jquery/mobile/valencia/icons-36-black.png +0 -0
- data/templates/mobile/jquery/mobile/valencia/icons-36-white.png +0 -0
- data/templates/mobile/jquery/mobile/valencia/texture_05.png +0 -0
- data/templates/mobile/jquery/mobile/valencia/texture_075.png +0 -0
- data/templates/mobile/lib/tasks/jquery.mobile.rake +106 -0
- data/templates/mobile/manifest.rb +191 -0
- data/templates/secret_sauce/app/views/shared/_ui_form_error_messages.html.haml +6 -0
- data/templates/secret_sauce/app/views/shared/_ui_grid_for_without_block.js.haml +144 -0
- data/templates/secret_sauce/app/views/shared/_ui_static_dialog.html.haml +6 -0
- data/templates/secret_sauce/config/initializers/secret_sauce.rb +8 -0
- data/templates/secret_sauce/jquery/secret_sauce.scss +33 -0
- data/templates/secret_sauce/manifest.rb +10 -0
- data/templates/secret_sauce/secret_sauce.js +12 -0
- data/templates/secret_sauce/secret_sauce.min.js +1 -0
- metadata +313 -17
- data/.gitignore +0 -22
- data/compass-jquery-plugin.gemspec +0 -1064
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -0,0 +1,106 @@
|
|
1
|
+
require 'fileutils'
|
2
|
+
JQ_MOBILE_SRC = File.join(RAILS_ROOT, 'tmp', 'jquery-mobile')
|
3
|
+
|
4
|
+
def convert2haml(src, dest)
|
5
|
+
tmp = src.gsub(/\.html$/, '.tmp')
|
6
|
+
open File.join(tmp), 'w' do |f|
|
7
|
+
text = File.read(src)
|
8
|
+
text.slice!(0..(text.index('<body>')+6))
|
9
|
+
text.lstrip!
|
10
|
+
text.slice!((text.rindex('</body>'))..text.length)
|
11
|
+
f.print text
|
12
|
+
f.close
|
13
|
+
end
|
14
|
+
system "html2haml -x #{tmp} #{dest}"
|
15
|
+
FileUtils.remove_file tmp if File.exists? tmp
|
16
|
+
puts "Converted: #{src}"
|
17
|
+
end
|
18
|
+
|
19
|
+
def cleanup(pattern)
|
20
|
+
puts "Cleanup started for: #{pattern}"
|
21
|
+
Dir["#{pattern}"].each do |file|
|
22
|
+
FileUtils.remove_file file if File.exists? file
|
23
|
+
puts "Removed: #{file}"
|
24
|
+
end
|
25
|
+
puts "Cleanup finished for: #{pattern}"
|
26
|
+
end
|
27
|
+
|
28
|
+
namespace :jquery do
|
29
|
+
namespace :mobile do
|
30
|
+
|
31
|
+
namespace :haml do
|
32
|
+
desc 'Cleanup directory'
|
33
|
+
task :cleanup, :dir do | t, args |
|
34
|
+
cleanup(args[:dir])
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
namespace :convert do
|
39
|
+
desc 'Convert API-Viewer files to haml'
|
40
|
+
task :api do
|
41
|
+
puts "Haml conversion started for API-Viewer:"
|
42
|
+
|
43
|
+
path = File.join(JQ_MOBILE_SRC, 'experiments/api-viewer')
|
44
|
+
cleanup("#{path}/*.html.haml")
|
45
|
+
Dir["#{path}/*.html"].each do |src|
|
46
|
+
dest = src.gsub(/\.html$/, '.html.haml')
|
47
|
+
convert2haml(src, dest)
|
48
|
+
end
|
49
|
+
|
50
|
+
path = File.join(path, 'docs')
|
51
|
+
cleanup("#{path}/*.html.haml")
|
52
|
+
Dir["#{path}/**/*.html"].each do |src|
|
53
|
+
dest = src.gsub(/\/index.html$/, '.html.haml')
|
54
|
+
convert2haml(src, dest)
|
55
|
+
end
|
56
|
+
puts "Haml conversion finished for API-Viewer."
|
57
|
+
end
|
58
|
+
|
59
|
+
desc 'Convert /docs files to haml'
|
60
|
+
task :docs do
|
61
|
+
puts "Haml conversion started for /docs files:"
|
62
|
+
|
63
|
+
path = File.join(JQ_MOBILE_SRC, 'docs')
|
64
|
+
cleanup("#{path}/*.html.haml")
|
65
|
+
Dir["#{path}/*.html"].each do |src|
|
66
|
+
dest = src.gsub(/\.html$/, '.html.haml')
|
67
|
+
convert2haml(src, dest)
|
68
|
+
end
|
69
|
+
|
70
|
+
cleanup("#{path}/**/*.html.haml")
|
71
|
+
Dir["#{path}/**/*.html"].each do |src|
|
72
|
+
dest = src.gsub(/\.html$/, '.html.haml')
|
73
|
+
convert2haml(src, dest)
|
74
|
+
end
|
75
|
+
puts "Haml conversion finished for /docs files."
|
76
|
+
end
|
77
|
+
|
78
|
+
desc 'Convert /experiments files to haml'
|
79
|
+
task :experiments do
|
80
|
+
puts "Haml conversion started for /experiments files:"
|
81
|
+
|
82
|
+
path = File.join(JQ_MOBILE_SRC, 'experiments')
|
83
|
+
cleanup("#{path}/**/*.html.haml")
|
84
|
+
Dir["#{path}/**/*.html"].each do |src|
|
85
|
+
next if /api-viewer/ =~ src
|
86
|
+
dest = src.gsub(/\.html$/, '.html.haml')
|
87
|
+
convert2haml(src, dest)
|
88
|
+
end
|
89
|
+
puts "Haml conversion finished for /experiments files."
|
90
|
+
end
|
91
|
+
|
92
|
+
desc 'Convert /speed files to haml'
|
93
|
+
task :speed do
|
94
|
+
puts "Haml conversion started for /speed files:"
|
95
|
+
|
96
|
+
path = File.join(JQ_MOBILE_SRC, 'speed')
|
97
|
+
cleanup("#{path}/*.html.haml")
|
98
|
+
Dir["#{path}/*.html"].each do |src|
|
99
|
+
dest = src.gsub(/\.html$/, '.html.haml')
|
100
|
+
convert2haml(src, dest)
|
101
|
+
end
|
102
|
+
puts "Haml conversion finished for /speed files."
|
103
|
+
end
|
104
|
+
end
|
105
|
+
end
|
106
|
+
end
|
@@ -0,0 +1,191 @@
|
|
1
|
+
# Generated by compass-jquery-plugin/gem-tasks/mobile.rake
|
2
|
+
# Install with: compass install jquery/mobile
|
3
|
+
|
4
|
+
file 'config/initializers/mobile.rb'
|
5
|
+
file 'lib/tasks/jquery.mobile.rake'
|
6
|
+
javascript 'jquery.mobile.js'
|
7
|
+
javascript 'jquery.mobile.min.js'
|
8
|
+
stylesheet 'jquery/mobile/_base.scss'
|
9
|
+
stylesheet 'jquery/mobile/default.scss'
|
10
|
+
image 'jquery/mobile/default/ajax-loader.png'
|
11
|
+
image 'jquery/mobile/default/form-check-off.png'
|
12
|
+
image 'jquery/mobile/default/form-check-on.png'
|
13
|
+
image 'jquery/mobile/default/form-radio-off.png'
|
14
|
+
image 'jquery/mobile/default/form-radio-on.png'
|
15
|
+
image 'jquery/mobile/default/icon-search-black.png'
|
16
|
+
image 'jquery/mobile/default/icons-18-black.png'
|
17
|
+
image 'jquery/mobile/default/icons-18-white.png'
|
18
|
+
image 'jquery/mobile/default/icons-36-black.png'
|
19
|
+
image 'jquery/mobile/default/icons-36-white.png'
|
20
|
+
stylesheet 'jquery/mobile/valencia.scss'
|
21
|
+
image 'jquery/mobile/valencia/ajax-loader.png'
|
22
|
+
image 'jquery/mobile/valencia/form-check-off.png'
|
23
|
+
image 'jquery/mobile/valencia/form-check-on.png'
|
24
|
+
image 'jquery/mobile/valencia/form-radio-off.png'
|
25
|
+
image 'jquery/mobile/valencia/form-radio-on.png'
|
26
|
+
image 'jquery/mobile/valencia/icon-search-black.png'
|
27
|
+
image 'jquery/mobile/valencia/icons-18-black.png'
|
28
|
+
image 'jquery/mobile/valencia/icons-18-white.png'
|
29
|
+
image 'jquery/mobile/valencia/icons-36-black.png'
|
30
|
+
image 'jquery/mobile/valencia/icons-36-white.png'
|
31
|
+
image 'jquery/mobile/valencia/texture_05.png'
|
32
|
+
image 'jquery/mobile/valencia/texture_075.png'
|
33
|
+
image 'glyphish/icons-black/01-refresh.png'
|
34
|
+
image 'glyphish/icons-black/02-redo.png'
|
35
|
+
image 'glyphish/icons-black/03-loopback.png'
|
36
|
+
image 'glyphish/icons-black/04-squiggle.png'
|
37
|
+
image 'glyphish/icons-black/05-shuffle.png'
|
38
|
+
image 'glyphish/icons-black/06-magnifying-glass.png'
|
39
|
+
image 'glyphish/icons-black/07-map-marker.png'
|
40
|
+
image 'glyphish/icons-black/08-chat.png'
|
41
|
+
image 'glyphish/icons-black/09-chat2.png'
|
42
|
+
image 'glyphish/icons-black/10-medical.png'
|
43
|
+
image 'glyphish/icons-black/100-coffee.png'
|
44
|
+
image 'glyphish/icons-black/101-gameplan.png'
|
45
|
+
image 'glyphish/icons-black/102-walk.png'
|
46
|
+
image 'glyphish/icons-black/103-map.png'
|
47
|
+
image 'glyphish/icons-black/104-index-cards.png'
|
48
|
+
image 'glyphish/icons-black/105-piano.png'
|
49
|
+
image 'glyphish/icons-black/106-sliders.png'
|
50
|
+
image 'glyphish/icons-black/107-widescreen.png'
|
51
|
+
image 'glyphish/icons-black/108-badge.png'
|
52
|
+
image 'glyphish/icons-black/109-chicken.png'
|
53
|
+
image 'glyphish/icons-black/11-clock.png'
|
54
|
+
image 'glyphish/icons-black/110-bug.png'
|
55
|
+
image 'glyphish/icons-black/111-user.png'
|
56
|
+
image 'glyphish/icons-black/112-group.png'
|
57
|
+
image 'glyphish/icons-black/113-navigation.png'
|
58
|
+
image 'glyphish/icons-black/114-balloon.png'
|
59
|
+
image 'glyphish/icons-black/115-bow-and-arrow.png'
|
60
|
+
image 'glyphish/icons-black/116-controller.png'
|
61
|
+
image 'glyphish/icons-black/117-todo.png'
|
62
|
+
image 'glyphish/icons-black/118-coathanger.png'
|
63
|
+
image 'glyphish/icons-black/119-piggybank.png'
|
64
|
+
image 'glyphish/icons-black/12-eye.png'
|
65
|
+
image 'glyphish/icons-black/120-headphones.png'
|
66
|
+
image 'glyphish/icons-black/121-lanscape.png'
|
67
|
+
image 'glyphish/icons-black/122-stats.png'
|
68
|
+
image 'glyphish/icons-black/123-id-card.png'
|
69
|
+
image 'glyphish/icons-black/124-bullhorn.png'
|
70
|
+
image 'glyphish/icons-black/125-food.png'
|
71
|
+
image 'glyphish/icons-black/126-moon.png'
|
72
|
+
image 'glyphish/icons-black/127-sock.png'
|
73
|
+
image 'glyphish/icons-black/128-bone.png'
|
74
|
+
image 'glyphish/icons-black/129-golf.png'
|
75
|
+
image 'glyphish/icons-black/13-target.png'
|
76
|
+
image 'glyphish/icons-black/130-dice.png'
|
77
|
+
image 'glyphish/icons-black/14-tag.png'
|
78
|
+
image 'glyphish/icons-black/15-tags.png'
|
79
|
+
image 'glyphish/icons-black/16-line-chart.png'
|
80
|
+
image 'glyphish/icons-black/17-bar-chart.png'
|
81
|
+
image 'glyphish/icons-black/18-envelope.png'
|
82
|
+
image 'glyphish/icons-black/19-gear.png'
|
83
|
+
image 'glyphish/icons-black/20-gear2.png'
|
84
|
+
image 'glyphish/icons-black/21-skull.png'
|
85
|
+
image 'glyphish/icons-black/22-skull-n-crossbones.png'
|
86
|
+
image 'glyphish/icons-black/23-bird.png'
|
87
|
+
image 'glyphish/icons-black/24-gift.png'
|
88
|
+
image 'glyphish/icons-black/25-weather.png'
|
89
|
+
image 'glyphish/icons-black/26-bandaid.png'
|
90
|
+
image 'glyphish/icons-black/27-planet.png'
|
91
|
+
image 'glyphish/icons-black/28-star.png'
|
92
|
+
image 'glyphish/icons-black/29-heart.png'
|
93
|
+
image 'glyphish/icons-black/30-key.png'
|
94
|
+
image 'glyphish/icons-black/31-ipod.png'
|
95
|
+
image 'glyphish/icons-black/32-iphone.png'
|
96
|
+
image 'glyphish/icons-black/33-cabinet.png'
|
97
|
+
image 'glyphish/icons-black/34-coffee.png'
|
98
|
+
image 'glyphish/icons-black/35-shopping-bag.png'
|
99
|
+
image 'glyphish/icons-black/36-toolbox.png'
|
100
|
+
image 'glyphish/icons-black/37-suitcase.png'
|
101
|
+
image 'glyphish/icons-black/38-airplane.png'
|
102
|
+
image 'glyphish/icons-black/39-spraycan.png'
|
103
|
+
image 'glyphish/icons-black/40-inbox.png'
|
104
|
+
image 'glyphish/icons-black/41-picture-frame.png'
|
105
|
+
image 'glyphish/icons-black/42-photos.png'
|
106
|
+
image 'glyphish/icons-black/43-film-roll.png'
|
107
|
+
image 'glyphish/icons-black/44-shoebox.png'
|
108
|
+
image 'glyphish/icons-black/45-movie1.png'
|
109
|
+
image 'glyphish/icons-black/46-movie2.png'
|
110
|
+
image 'glyphish/icons-black/47-fuel.png'
|
111
|
+
image 'glyphish/icons-black/48-fork-and-knife.png'
|
112
|
+
image 'glyphish/icons-black/49-battery.png'
|
113
|
+
image 'glyphish/icons-black/50-beaker.png'
|
114
|
+
image 'glyphish/icons-black/51-outlet.png'
|
115
|
+
image 'glyphish/icons-black/52-pinetree.png'
|
116
|
+
image 'glyphish/icons-black/53-house.png'
|
117
|
+
image 'glyphish/icons-black/54-lock.png'
|
118
|
+
image 'glyphish/icons-black/55-network.png'
|
119
|
+
image 'glyphish/icons-black/56-cloud.png'
|
120
|
+
image 'glyphish/icons-black/57-download.png'
|
121
|
+
image 'glyphish/icons-black/58-bookmark.png'
|
122
|
+
image 'glyphish/icons-black/59-flag.png'
|
123
|
+
image 'glyphish/icons-black/60-signpost.png'
|
124
|
+
image 'glyphish/icons-black/61-brightness.png'
|
125
|
+
image 'glyphish/icons-black/62-contrast.png'
|
126
|
+
image 'glyphish/icons-black/63-runner.png'
|
127
|
+
image 'glyphish/icons-black/64-zap.png'
|
128
|
+
image 'glyphish/icons-black/65-note.png'
|
129
|
+
image 'glyphish/icons-black/66-microphone.png'
|
130
|
+
image 'glyphish/icons-black/67-tshirt.png'
|
131
|
+
image 'glyphish/icons-black/68-paperclip.png'
|
132
|
+
image 'glyphish/icons-black/69-display.png'
|
133
|
+
image 'glyphish/icons-black/70-tv.png'
|
134
|
+
image 'glyphish/icons-black/71-compass.png'
|
135
|
+
image 'glyphish/icons-black/72-pin.png'
|
136
|
+
image 'glyphish/icons-black/73-radar.png'
|
137
|
+
image 'glyphish/icons-black/74-location.png'
|
138
|
+
image 'glyphish/icons-black/75-phone.png'
|
139
|
+
image 'glyphish/icons-black/76-baby.png'
|
140
|
+
image 'glyphish/icons-black/77-ekg.png'
|
141
|
+
image 'glyphish/icons-black/78-stopwatch.png'
|
142
|
+
image 'glyphish/icons-black/79-medical-bag.png'
|
143
|
+
image 'glyphish/icons-black/80-shopping-cart.png'
|
144
|
+
image 'glyphish/icons-black/81-dashboard.png'
|
145
|
+
image 'glyphish/icons-black/82-dogpaw.png'
|
146
|
+
image 'glyphish/icons-black/83-calendar.png'
|
147
|
+
image 'glyphish/icons-black/84-lightbulb.png'
|
148
|
+
image 'glyphish/icons-black/85-trophy.png'
|
149
|
+
image 'glyphish/icons-black/86-camera.png'
|
150
|
+
image 'glyphish/icons-black/87-wineglass.png'
|
151
|
+
image 'glyphish/icons-black/88-beermug.png'
|
152
|
+
image 'glyphish/icons-black/89-dumbbell.png'
|
153
|
+
image 'glyphish/icons-black/90-lifebuoy.png'
|
154
|
+
image 'glyphish/icons-black/91-beaker2.png'
|
155
|
+
image 'glyphish/icons-black/92-testtube.png'
|
156
|
+
image 'glyphish/icons-black/93-thermometer.png'
|
157
|
+
image 'glyphish/icons-black/94-pill.png'
|
158
|
+
image 'glyphish/icons-black/95-equalizer.png'
|
159
|
+
image 'glyphish/icons-black/96-book.png'
|
160
|
+
image 'glyphish/icons-black/97-puzzle.png'
|
161
|
+
image 'glyphish/icons-black/98-palette.png'
|
162
|
+
image 'glyphish/icons-black/99-umbrella.png'
|
163
|
+
image 'glyphish/icons-white/09-chat2.png'
|
164
|
+
image 'glyphish/icons-white/100-coffee.png'
|
165
|
+
image 'glyphish/icons-white/18-envelope.png'
|
166
|
+
image 'glyphish/icons-white/19-gear.png'
|
167
|
+
image 'glyphish/icons-white/21-skull.png'
|
168
|
+
image 'glyphish/icons-white/30-key.png'
|
169
|
+
image 'glyphish/icons-white/34-coffee.png'
|
170
|
+
image 'glyphish/icons-white/88-beermug.png'
|
171
|
+
image 'glyphish/mini-icons-black/band-aid.png'
|
172
|
+
image 'glyphish/mini-icons-black/chat.png'
|
173
|
+
image 'glyphish/mini-icons-black/clock.png'
|
174
|
+
image 'glyphish/mini-icons-black/eye.png'
|
175
|
+
image 'glyphish/mini-icons-black/flag.png'
|
176
|
+
image 'glyphish/mini-icons-black/fork-and-knife.png'
|
177
|
+
image 'glyphish/mini-icons-black/gear.png'
|
178
|
+
image 'glyphish/mini-icons-black/heart.png'
|
179
|
+
image 'glyphish/mini-icons-black/lightning-bolt.png'
|
180
|
+
image 'glyphish/mini-icons-black/magnifying-glass.png'
|
181
|
+
image 'glyphish/mini-icons-black/map-marker.png'
|
182
|
+
image 'glyphish/mini-icons-black/map-pin.png'
|
183
|
+
image 'glyphish/mini-icons-black/microphone.png'
|
184
|
+
image 'glyphish/mini-icons-black/music-note.png'
|
185
|
+
image 'glyphish/mini-icons-black/paw.png'
|
186
|
+
image 'glyphish/mini-icons-black/plus.png'
|
187
|
+
image 'glyphish/mini-icons-black/puzzle.png'
|
188
|
+
image 'glyphish/mini-icons-black/star.png'
|
189
|
+
image 'glyphish/mini-icons-black/tag.png'
|
190
|
+
image 'glyphish/mini-icons-black/tshirt.png'
|
191
|
+
image 'glyphish/Read me first - license.txt'
|
@@ -0,0 +1,144 @@
|
|
1
|
+
:javascript
|
2
|
+
$(document).ready(function() {
|
3
|
+
$.jgrid.no_legacy_api = true;
|
4
|
+
$('##{name}_table').jqGrid(#{options.to_json});
|
5
|
+
$('##{name}_table').jqGrid('navGrid',"##{name}_pager", #{nav.to_json});
|
6
|
+
});
|
7
|
+
|
8
|
+
- if actions
|
9
|
+
- if actions[:destroy]
|
10
|
+
:javascript
|
11
|
+
$(document).ready(function() {
|
12
|
+
$("##{name}_table").jqGrid('navButtonAdd',"##{name}_pager", {
|
13
|
+
caption: "",
|
14
|
+
position: "first",
|
15
|
+
buttonicon: "ui-icon-trash",
|
16
|
+
onClickButton: function() {
|
17
|
+
var rowId = $("##{name}_table").jqGrid('getGridParam', "selrow");
|
18
|
+
if(rowId == null) {
|
19
|
+
alert("You must first select a row.");
|
20
|
+
} else {
|
21
|
+
var sure = confirm("Are you sure?")
|
22
|
+
if(sure) {
|
23
|
+
$.ajax({url: "#{url}/"+rowId,
|
24
|
+
type: "DELETE",
|
25
|
+
data: {authenticity_token: "#{form_authenticity_token}"},
|
26
|
+
success: function() {
|
27
|
+
$("##{name}_table").trigger("reloadGrid");
|
28
|
+
}
|
29
|
+
});
|
30
|
+
}
|
31
|
+
}
|
32
|
+
}
|
33
|
+
});
|
34
|
+
});
|
35
|
+
|
36
|
+
- if actions[:update]
|
37
|
+
:javascript
|
38
|
+
$(document).ready(function() {
|
39
|
+
$("##{name}_table").jqGrid('navButtonAdd',"##{name}_pager", {
|
40
|
+
caption: "",
|
41
|
+
position: "first",
|
42
|
+
buttonicon: "ui-icon-pencil",
|
43
|
+
onClickButton: function() {
|
44
|
+
var rowId = $("##{name}_table").jqGrid('getGridParam', "selrow")
|
45
|
+
if(rowId == null) {
|
46
|
+
alert("You must first select a row.");
|
47
|
+
} else {
|
48
|
+
$.ajax({method: "GET", url: "#{url}#{actions[:update]}/"+rowId,
|
49
|
+
success: function(data, status) {
|
50
|
+
var dWidth = $(data).css("width");
|
51
|
+
var dHeight = $(data).css("height");
|
52
|
+
$("##{name}_update_dialog").append(data)
|
53
|
+
$("#widget_submit").hide(); // HACK: easy way to make submit on enter work
|
54
|
+
$("##{name}_update_dialog").find("form").submit(function() {
|
55
|
+
$(this).ajaxSubmit({
|
56
|
+
url: "/jqgrid/#{name}/"+rowId,
|
57
|
+
type: "PUT",
|
58
|
+
success: function(response, status) {
|
59
|
+
if(!$(response).is("form")) {
|
60
|
+
$("##{name}_update_dialog").dialog('close');
|
61
|
+
$("##{name}_table").trigger("reloadGrid");
|
62
|
+
} else {
|
63
|
+
$("##{name}_update_dialog").find("form").replaceWith(response);
|
64
|
+
}
|
65
|
+
}
|
66
|
+
});
|
67
|
+
return false;
|
68
|
+
});
|
69
|
+
$("##{name}_update_dialog").dialog({
|
70
|
+
buttons: {
|
71
|
+
"Save": function() {$(this).find("form").submit();},
|
72
|
+
"Cancel": function() {$(this).dialog('close');}
|
73
|
+
},
|
74
|
+
title: "Edit",
|
75
|
+
//width: dWidth,
|
76
|
+
//height: dHeight,
|
77
|
+
modal: true,
|
78
|
+
draggable: false,
|
79
|
+
//resizable: false,
|
80
|
+
close: function() {
|
81
|
+
$(this).dialog('destroy');
|
82
|
+
$("##{name}_update_dialog").children().remove();
|
83
|
+
$("##{name}_table").trigger("reloadGrid");
|
84
|
+
}
|
85
|
+
});
|
86
|
+
}
|
87
|
+
});
|
88
|
+
}
|
89
|
+
}
|
90
|
+
});
|
91
|
+
});
|
92
|
+
|
93
|
+
- if actions[:create]
|
94
|
+
:javascript
|
95
|
+
$(document).ready(function() {
|
96
|
+
$("##{name}_table").jqGrid('navButtonAdd',"##{name}_pager", {
|
97
|
+
caption: "",
|
98
|
+
position: "first",
|
99
|
+
buttonicon: "ui-icon-plus",
|
100
|
+
onClickButton: function() {
|
101
|
+
$.ajax({method: "GET", url: "#{url}#{actions[:create]}",
|
102
|
+
success: function(data, status) {
|
103
|
+
var dWidth = $(data).css("width");
|
104
|
+
var dHeight = $(data).css("height");
|
105
|
+
$("##{name}_create_dialog").append(data);
|
106
|
+
$("#widget_submit").hide(); // HACK: easy way to make submit on enter work
|
107
|
+
$("##{name}_create_dialog").find("form").submit(function() {
|
108
|
+
$(this).ajaxSubmit({
|
109
|
+
url: $(this).attr("action"),
|
110
|
+
data: $(this).serialize(),
|
111
|
+
type: "POST",
|
112
|
+
success: function(response, status) {
|
113
|
+
if(!$(response).is("form")) {
|
114
|
+
$("##{name}_create_dialog").dialog('close');
|
115
|
+
$("##{name}_table").trigger("reloadGrid");
|
116
|
+
} else {
|
117
|
+
$("##{name}_create_dialog").find("form").replaceWith(response);
|
118
|
+
}
|
119
|
+
}
|
120
|
+
});
|
121
|
+
return false;
|
122
|
+
});
|
123
|
+
$("##{name}_create_dialog").dialog({
|
124
|
+
buttons: {
|
125
|
+
"Save": function() {$(this).find("form").submit();},
|
126
|
+
"Cancel": function() {$(this).dialog('close');}
|
127
|
+
},
|
128
|
+
title: "New",
|
129
|
+
//width: dWidth,
|
130
|
+
//height: dHeight,
|
131
|
+
modal: true,
|
132
|
+
draggable: false,
|
133
|
+
//resizable: false,
|
134
|
+
close: function() {
|
135
|
+
$(this).dialog('destroy');
|
136
|
+
$("##{name}_create_dialog").children().remove();
|
137
|
+
$("##{name}_table").trigger("reloadGrid");
|
138
|
+
}
|
139
|
+
});
|
140
|
+
}
|
141
|
+
});
|
142
|
+
}
|
143
|
+
});
|
144
|
+
});
|