compass-jquery-plugin 0.3.0.beta.26 → 0.3.0.rc.1
Sign up to get free protection for your applications and to get access to all the features.
- data/README.textile +1 -52
- data/VERSION.yml +1 -1
- data/compass-jquery-plugin.gemspec +6 -407
- data/gem_tasks/jrails.rake +84 -85
- data/gem_tasks/rubygems.rake +9 -1
- data/templates/jqtouch/config/initializers/jqtouch.rb +1 -1
- data/templates/jrails/config/initializers/jrails.rb +3 -3
- data/templates/jrails/{jquery-ui-1.8.6.js → jquery-ui.js} +0 -0
- data/templates/jrails/{jquery-ui-1.8.6.min.js → jquery-ui.min.js} +0 -0
- data/templates/jrails/{jquery-1.4.4.js → jquery.js} +360 -284
- data/templates/jrails/jquery.min.js +151 -0
- data/templates/jrails/manifest.rb +4 -4
- metadata +9 -410
- data/gem_tasks/jqgrid.rake +0 -119
- data/gem_tasks/mobile.rake +0 -144
- data/gem_tasks/secret_sauce.rake +0 -64
- data/lib/jquery/gridify/assertions.rb +0 -37
- data/lib/jquery/gridify/grid.rb +0 -147
- data/lib/jquery/gridify/grid_column.rb +0 -134
- data/lib/jquery/gridify/grid_finder.rb +0 -223
- data/lib/jquery/gridify/grid_options.rb +0 -279
- data/lib/jquery/gridify/grid_view.rb +0 -435
- data/lib/jquery/gridify.rb +0 -42
- data/lib/jquery/jqgrid/jqgrid.rb +0 -438
- data/lib/jquery/jqgrid.rb +0 -5
- data/lib/jquery/mobile.rb +0 -3
- data/lib/jquery/secret_sauce/controller/ui_dialog_controls.rb +0 -14
- data/lib/jquery/secret_sauce/controller/ui_grid_controls.rb +0 -18
- data/lib/jquery/secret_sauce/helpers/ui_dialog_helper.rb +0 -6
- data/lib/jquery/secret_sauce/helpers/ui_form_helper.rb +0 -118
- data/lib/jquery/secret_sauce/helpers/ui_grid_helper.rb +0 -226
- data/lib/jquery/secret_sauce/model/find_for_grid.rb +0 -42
- data/lib/jquery/secret_sauce.rb +0 -9
- data/templates/jqgrid/config/initializers/jqgrid.rb +0 -4
- data/templates/jqgrid/config/locales/jquery/jqgrid/de.yml +0 -7
- data/templates/jqgrid/config/locales/jquery/jqgrid/en.yml +0 -7
- data/templates/jqgrid/i18n/jqgrid/locale-bg.js +0 -132
- data/templates/jqgrid/i18n/jqgrid/locale-bg.min.js +0 -6
- data/templates/jqgrid/i18n/jqgrid/locale-bg1251.js +0 -132
- data/templates/jqgrid/i18n/jqgrid/locale-bg1251.min.js +0 -6
- data/templates/jqgrid/i18n/jqgrid/locale-cat.js +0 -128
- data/templates/jqgrid/i18n/jqgrid/locale-cat.min.js +0 -6
- data/templates/jqgrid/i18n/jqgrid/locale-cn.js +0 -132
- data/templates/jqgrid/i18n/jqgrid/locale-cn.min.js +0 -5
- data/templates/jqgrid/i18n/jqgrid/locale-cs.js +0 -128
- data/templates/jqgrid/i18n/jqgrid/locale-cs.min.js +0 -6
- data/templates/jqgrid/i18n/jqgrid/locale-da.js +0 -128
- data/templates/jqgrid/i18n/jqgrid/locale-da.min.js +0 -6
- data/templates/jqgrid/i18n/jqgrid/locale-de.js +0 -133
- data/templates/jqgrid/i18n/jqgrid/locale-de.min.js +0 -7
- data/templates/jqgrid/i18n/jqgrid/locale-el.js +0 -126
- data/templates/jqgrid/i18n/jqgrid/locale-el.min.js +0 -7
- data/templates/jqgrid/i18n/jqgrid/locale-en.js +0 -128
- data/templates/jqgrid/i18n/jqgrid/locale-en.min.js +0 -6
- data/templates/jqgrid/i18n/jqgrid/locale-es.js +0 -128
- data/templates/jqgrid/i18n/jqgrid/locale-es.min.js +0 -7
- data/templates/jqgrid/i18n/jqgrid/locale-fa.js +0 -125
- data/templates/jqgrid/i18n/jqgrid/locale-fa.min.js +0 -6
- data/templates/jqgrid/i18n/jqgrid/locale-fi.js +0 -130
- data/templates/jqgrid/i18n/jqgrid/locale-fi.min.js +0 -6
- data/templates/jqgrid/i18n/jqgrid/locale-fr.js +0 -126
- data/templates/jqgrid/i18n/jqgrid/locale-fr.min.js +0 -7
- data/templates/jqgrid/i18n/jqgrid/locale-gl.js +0 -126
- data/templates/jqgrid/i18n/jqgrid/locale-gl.min.js +0 -7
- data/templates/jqgrid/i18n/jqgrid/locale-he.js +0 -127
- data/templates/jqgrid/i18n/jqgrid/locale-he.min.js +0 -6
- data/templates/jqgrid/i18n/jqgrid/locale-hu.js +0 -129
- data/templates/jqgrid/i18n/jqgrid/locale-hu.min.js +0 -6
- data/templates/jqgrid/i18n/jqgrid/locale-is.js +0 -126
- data/templates/jqgrid/i18n/jqgrid/locale-is.min.js +0 -6
- data/templates/jqgrid/i18n/jqgrid/locale-it.js +0 -1
- data/templates/jqgrid/i18n/jqgrid/locale-it.min.js +0 -7
- data/templates/jqgrid/i18n/jqgrid/locale-ja.js +0 -155
- data/templates/jqgrid/i18n/jqgrid/locale-ja.min.js +0 -5
- data/templates/jqgrid/i18n/jqgrid/locale-nl.js +0 -149
- data/templates/jqgrid/i18n/jqgrid/locale-nl.min.js +0 -6
- data/templates/jqgrid/i18n/jqgrid/locale-no.js +0 -1
- data/templates/jqgrid/i18n/jqgrid/locale-no.min.js +0 -6
- data/templates/jqgrid/i18n/jqgrid/locale-pl.js +0 -127
- data/templates/jqgrid/i18n/jqgrid/locale-pl.min.js +0 -6
- data/templates/jqgrid/i18n/jqgrid/locale-pt-br.js +0 -127
- data/templates/jqgrid/i18n/jqgrid/locale-pt-br.min.js +0 -6
- data/templates/jqgrid/i18n/jqgrid/locale-pt.js +0 -125
- data/templates/jqgrid/i18n/jqgrid/locale-pt.min.js +0 -6
- data/templates/jqgrid/i18n/jqgrid/locale-ro.js +0 -139
- data/templates/jqgrid/i18n/jqgrid/locale-ro.min.js +0 -7
- data/templates/jqgrid/i18n/jqgrid/locale-ru.js +0 -127
- data/templates/jqgrid/i18n/jqgrid/locale-ru.min.js +0 -7
- data/templates/jqgrid/i18n/jqgrid/locale-sk.js +0 -127
- data/templates/jqgrid/i18n/jqgrid/locale-sk.min.js +0 -6
- data/templates/jqgrid/i18n/jqgrid/locale-sv.js +0 -127
- data/templates/jqgrid/i18n/jqgrid/locale-sv.min.js +0 -6
- data/templates/jqgrid/i18n/jqgrid/locale-tr.js +0 -126
- data/templates/jqgrid/i18n/jqgrid/locale-tr.min.js +0 -6
- data/templates/jqgrid/i18n/jqgrid/locale-ua.js +0 -127
- data/templates/jqgrid/i18n/jqgrid/locale-ua.min.js +0 -7
- data/templates/jqgrid/jquery/jqGrid.scss +0 -692
- data/templates/jqgrid/jquery.jqGrid.js +0 -11576
- data/templates/jqgrid/jquery.jqGrid.min.js +0 -472
- data/templates/jqgrid/manifest.rb +0 -70
- data/templates/jqgrid/public/stylesheets/ellipsis-xbl.xml +0 -13
- data/templates/jrails/jquery-1.4.4.min.js +0 -152
- data/templates/mobile/config/initializers/mobile.rb +0 -6
- data/templates/mobile/glyphish/Read me first - license.txt +0 -14
- data/templates/mobile/glyphish/icons/01-refresh.png +0 -0
- data/templates/mobile/glyphish/icons/02-redo.png +0 -0
- data/templates/mobile/glyphish/icons/03-loopback.png +0 -0
- data/templates/mobile/glyphish/icons/04-squiggle.png +0 -0
- data/templates/mobile/glyphish/icons/05-shuffle.png +0 -0
- data/templates/mobile/glyphish/icons/06-magnifying-glass.png +0 -0
- data/templates/mobile/glyphish/icons/07-map-marker.png +0 -0
- data/templates/mobile/glyphish/icons/08-chat.png +0 -0
- data/templates/mobile/glyphish/icons/09-chat2.png +0 -0
- data/templates/mobile/glyphish/icons/10-medical.png +0 -0
- data/templates/mobile/glyphish/icons/100-coffee.png +0 -0
- data/templates/mobile/glyphish/icons/101-gameplan.png +0 -0
- data/templates/mobile/glyphish/icons/102-walk.png +0 -0
- data/templates/mobile/glyphish/icons/103-map.png +0 -0
- data/templates/mobile/glyphish/icons/104-index-cards.png +0 -0
- data/templates/mobile/glyphish/icons/105-piano.png +0 -0
- data/templates/mobile/glyphish/icons/106-sliders.png +0 -0
- data/templates/mobile/glyphish/icons/107-widescreen.png +0 -0
- data/templates/mobile/glyphish/icons/108-badge.png +0 -0
- data/templates/mobile/glyphish/icons/109-chicken.png +0 -0
- data/templates/mobile/glyphish/icons/11-clock.png +0 -0
- data/templates/mobile/glyphish/icons/110-bug.png +0 -0
- data/templates/mobile/glyphish/icons/111-user.png +0 -0
- data/templates/mobile/glyphish/icons/112-group.png +0 -0
- data/templates/mobile/glyphish/icons/113-navigation.png +0 -0
- data/templates/mobile/glyphish/icons/114-balloon.png +0 -0
- data/templates/mobile/glyphish/icons/115-bow-and-arrow.png +0 -0
- data/templates/mobile/glyphish/icons/116-controller.png +0 -0
- data/templates/mobile/glyphish/icons/117-todo.png +0 -0
- data/templates/mobile/glyphish/icons/118-coathanger.png +0 -0
- data/templates/mobile/glyphish/icons/119-piggybank.png +0 -0
- data/templates/mobile/glyphish/icons/12-eye.png +0 -0
- data/templates/mobile/glyphish/icons/120-headphones.png +0 -0
- data/templates/mobile/glyphish/icons/121-lanscape.png +0 -0
- data/templates/mobile/glyphish/icons/122-stats.png +0 -0
- data/templates/mobile/glyphish/icons/123-id-card.png +0 -0
- data/templates/mobile/glyphish/icons/124-bullhorn.png +0 -0
- data/templates/mobile/glyphish/icons/125-food.png +0 -0
- data/templates/mobile/glyphish/icons/126-moon.png +0 -0
- data/templates/mobile/glyphish/icons/127-sock.png +0 -0
- data/templates/mobile/glyphish/icons/128-bone.png +0 -0
- data/templates/mobile/glyphish/icons/129-golf.png +0 -0
- data/templates/mobile/glyphish/icons/13-target.png +0 -0
- data/templates/mobile/glyphish/icons/130-dice.png +0 -0
- data/templates/mobile/glyphish/icons/14-tag.png +0 -0
- data/templates/mobile/glyphish/icons/15-tags.png +0 -0
- data/templates/mobile/glyphish/icons/16-line-chart.png +0 -0
- data/templates/mobile/glyphish/icons/17-bar-chart.png +0 -0
- data/templates/mobile/glyphish/icons/18-envelope.png +0 -0
- data/templates/mobile/glyphish/icons/19-gear.png +0 -0
- data/templates/mobile/glyphish/icons/20-gear2.png +0 -0
- data/templates/mobile/glyphish/icons/21-skull.png +0 -0
- data/templates/mobile/glyphish/icons/22-skull-n-crossbones.png +0 -0
- data/templates/mobile/glyphish/icons/23-bird.png +0 -0
- data/templates/mobile/glyphish/icons/24-gift.png +0 -0
- data/templates/mobile/glyphish/icons/25-weather.png +0 -0
- data/templates/mobile/glyphish/icons/26-bandaid.png +0 -0
- data/templates/mobile/glyphish/icons/27-planet.png +0 -0
- data/templates/mobile/glyphish/icons/28-star.png +0 -0
- data/templates/mobile/glyphish/icons/29-heart.png +0 -0
- data/templates/mobile/glyphish/icons/30-key.png +0 -0
- data/templates/mobile/glyphish/icons/31-ipod.png +0 -0
- data/templates/mobile/glyphish/icons/32-iphone.png +0 -0
- data/templates/mobile/glyphish/icons/33-cabinet.png +0 -0
- data/templates/mobile/glyphish/icons/34-coffee.png +0 -0
- data/templates/mobile/glyphish/icons/35-shopping-bag.png +0 -0
- data/templates/mobile/glyphish/icons/36-toolbox.png +0 -0
- data/templates/mobile/glyphish/icons/37-suitcase.png +0 -0
- data/templates/mobile/glyphish/icons/38-airplane.png +0 -0
- data/templates/mobile/glyphish/icons/39-spraycan.png +0 -0
- data/templates/mobile/glyphish/icons/40-inbox.png +0 -0
- data/templates/mobile/glyphish/icons/41-picture-frame.png +0 -0
- data/templates/mobile/glyphish/icons/42-photos.png +0 -0
- data/templates/mobile/glyphish/icons/43-film-roll.png +0 -0
- data/templates/mobile/glyphish/icons/44-shoebox.png +0 -0
- data/templates/mobile/glyphish/icons/45-movie1.png +0 -0
- data/templates/mobile/glyphish/icons/46-movie2.png +0 -0
- data/templates/mobile/glyphish/icons/47-fuel.png +0 -0
- data/templates/mobile/glyphish/icons/48-fork-and-knife.png +0 -0
- data/templates/mobile/glyphish/icons/49-battery.png +0 -0
- data/templates/mobile/glyphish/icons/50-beaker.png +0 -0
- data/templates/mobile/glyphish/icons/51-outlet.png +0 -0
- data/templates/mobile/glyphish/icons/52-pinetree.png +0 -0
- data/templates/mobile/glyphish/icons/53-house.png +0 -0
- data/templates/mobile/glyphish/icons/54-lock.png +0 -0
- data/templates/mobile/glyphish/icons/55-network.png +0 -0
- data/templates/mobile/glyphish/icons/56-cloud.png +0 -0
- data/templates/mobile/glyphish/icons/57-download.png +0 -0
- data/templates/mobile/glyphish/icons/58-bookmark.png +0 -0
- data/templates/mobile/glyphish/icons/59-flag.png +0 -0
- data/templates/mobile/glyphish/icons/60-signpost.png +0 -0
- data/templates/mobile/glyphish/icons/61-brightness.png +0 -0
- data/templates/mobile/glyphish/icons/62-contrast.png +0 -0
- data/templates/mobile/glyphish/icons/63-runner.png +0 -0
- data/templates/mobile/glyphish/icons/64-zap.png +0 -0
- data/templates/mobile/glyphish/icons/65-note.png +0 -0
- data/templates/mobile/glyphish/icons/66-microphone.png +0 -0
- data/templates/mobile/glyphish/icons/67-tshirt.png +0 -0
- data/templates/mobile/glyphish/icons/68-paperclip.png +0 -0
- data/templates/mobile/glyphish/icons/69-display.png +0 -0
- data/templates/mobile/glyphish/icons/70-tv.png +0 -0
- data/templates/mobile/glyphish/icons/71-compass.png +0 -0
- data/templates/mobile/glyphish/icons/72-pin.png +0 -0
- data/templates/mobile/glyphish/icons/73-radar.png +0 -0
- data/templates/mobile/glyphish/icons/74-location.png +0 -0
- data/templates/mobile/glyphish/icons/75-phone.png +0 -0
- data/templates/mobile/glyphish/icons/76-baby.png +0 -0
- data/templates/mobile/glyphish/icons/77-ekg.png +0 -0
- data/templates/mobile/glyphish/icons/78-stopwatch.png +0 -0
- data/templates/mobile/glyphish/icons/79-medical-bag.png +0 -0
- data/templates/mobile/glyphish/icons/80-shopping-cart.png +0 -0
- data/templates/mobile/glyphish/icons/81-dashboard.png +0 -0
- data/templates/mobile/glyphish/icons/82-dogpaw.png +0 -0
- data/templates/mobile/glyphish/icons/83-calendar.png +0 -0
- data/templates/mobile/glyphish/icons/84-lightbulb.png +0 -0
- data/templates/mobile/glyphish/icons/85-trophy.png +0 -0
- data/templates/mobile/glyphish/icons/86-camera.png +0 -0
- data/templates/mobile/glyphish/icons/87-wineglass.png +0 -0
- data/templates/mobile/glyphish/icons/88-beermug.png +0 -0
- data/templates/mobile/glyphish/icons/89-dumbbell.png +0 -0
- data/templates/mobile/glyphish/icons/90-lifebuoy.png +0 -0
- data/templates/mobile/glyphish/icons/91-beaker2.png +0 -0
- data/templates/mobile/glyphish/icons/92-testtube.png +0 -0
- data/templates/mobile/glyphish/icons/93-thermometer.png +0 -0
- data/templates/mobile/glyphish/icons/94-pill.png +0 -0
- data/templates/mobile/glyphish/icons/95-equalizer.png +0 -0
- data/templates/mobile/glyphish/icons/96-book.png +0 -0
- data/templates/mobile/glyphish/icons/97-puzzle.png +0 -0
- data/templates/mobile/glyphish/icons/98-palette.png +0 -0
- data/templates/mobile/glyphish/icons/99-umbrella.png +0 -0
- data/templates/mobile/glyphish/mini-icons/01-refresh.png +0 -0
- data/templates/mobile/glyphish/mini-icons/02-redo.png +0 -0
- data/templates/mobile/glyphish/mini-icons/03-loopback.png +0 -0
- data/templates/mobile/glyphish/mini-icons/04-squiggle.png +0 -0
- data/templates/mobile/glyphish/mini-icons/05-shuffle.png +0 -0
- data/templates/mobile/glyphish/mini-icons/06-magnifying-glass.png +0 -0
- data/templates/mobile/glyphish/mini-icons/07-map-marker.png +0 -0
- data/templates/mobile/glyphish/mini-icons/08-chat.png +0 -0
- data/templates/mobile/glyphish/mini-icons/09-chat2.png +0 -0
- data/templates/mobile/glyphish/mini-icons/10-medical.png +0 -0
- data/templates/mobile/glyphish/mini-icons/100-coffee.png +0 -0
- data/templates/mobile/glyphish/mini-icons/101-gameplan.png +0 -0
- data/templates/mobile/glyphish/mini-icons/102-walk.png +0 -0
- data/templates/mobile/glyphish/mini-icons/103-map.png +0 -0
- data/templates/mobile/glyphish/mini-icons/104-index-cards.png +0 -0
- data/templates/mobile/glyphish/mini-icons/105-piano.png +0 -0
- data/templates/mobile/glyphish/mini-icons/106-sliders.png +0 -0
- data/templates/mobile/glyphish/mini-icons/107-widescreen.png +0 -0
- data/templates/mobile/glyphish/mini-icons/108-badge.png +0 -0
- data/templates/mobile/glyphish/mini-icons/109-chicken.png +0 -0
- data/templates/mobile/glyphish/mini-icons/11-clock.png +0 -0
- data/templates/mobile/glyphish/mini-icons/110-bug.png +0 -0
- data/templates/mobile/glyphish/mini-icons/111-user.png +0 -0
- data/templates/mobile/glyphish/mini-icons/112-group.png +0 -0
- data/templates/mobile/glyphish/mini-icons/113-navigation.png +0 -0
- data/templates/mobile/glyphish/mini-icons/114-balloon.png +0 -0
- data/templates/mobile/glyphish/mini-icons/115-bow-and-arrow.png +0 -0
- data/templates/mobile/glyphish/mini-icons/116-controller.png +0 -0
- data/templates/mobile/glyphish/mini-icons/117-todo.png +0 -0
- data/templates/mobile/glyphish/mini-icons/118-coathanger.png +0 -0
- data/templates/mobile/glyphish/mini-icons/119-piggybank.png +0 -0
- data/templates/mobile/glyphish/mini-icons/12-eye.png +0 -0
- data/templates/mobile/glyphish/mini-icons/120-headphones.png +0 -0
- data/templates/mobile/glyphish/mini-icons/121-lanscape.png +0 -0
- data/templates/mobile/glyphish/mini-icons/122-stats.png +0 -0
- data/templates/mobile/glyphish/mini-icons/123-id-card.png +0 -0
- data/templates/mobile/glyphish/mini-icons/124-bullhorn.png +0 -0
- data/templates/mobile/glyphish/mini-icons/125-food.png +0 -0
- data/templates/mobile/glyphish/mini-icons/126-moon.png +0 -0
- data/templates/mobile/glyphish/mini-icons/127-sock.png +0 -0
- data/templates/mobile/glyphish/mini-icons/128-bone.png +0 -0
- data/templates/mobile/glyphish/mini-icons/129-golf.png +0 -0
- data/templates/mobile/glyphish/mini-icons/13-target.png +0 -0
- data/templates/mobile/glyphish/mini-icons/130-dice.png +0 -0
- data/templates/mobile/glyphish/mini-icons/14-tag.png +0 -0
- data/templates/mobile/glyphish/mini-icons/15-tags.png +0 -0
- data/templates/mobile/glyphish/mini-icons/16-line-chart.png +0 -0
- data/templates/mobile/glyphish/mini-icons/17-bar-chart.png +0 -0
- data/templates/mobile/glyphish/mini-icons/18-envelope.png +0 -0
- data/templates/mobile/glyphish/mini-icons/19-gear.png +0 -0
- data/templates/mobile/glyphish/mini-icons/20-gear2.png +0 -0
- data/templates/mobile/glyphish/mini-icons/21-skull.png +0 -0
- data/templates/mobile/glyphish/mini-icons/22-skull-n-crossbones.png +0 -0
- data/templates/mobile/glyphish/mini-icons/23-bird.png +0 -0
- data/templates/mobile/glyphish/mini-icons/24-gift.png +0 -0
- data/templates/mobile/glyphish/mini-icons/25-weather.png +0 -0
- data/templates/mobile/glyphish/mini-icons/26-bandaid.png +0 -0
- data/templates/mobile/glyphish/mini-icons/27-planet.png +0 -0
- data/templates/mobile/glyphish/mini-icons/28-star.png +0 -0
- data/templates/mobile/glyphish/mini-icons/29-heart.png +0 -0
- data/templates/mobile/glyphish/mini-icons/30-key.png +0 -0
- data/templates/mobile/glyphish/mini-icons/31-ipod.png +0 -0
- data/templates/mobile/glyphish/mini-icons/32-iphone.png +0 -0
- data/templates/mobile/glyphish/mini-icons/33-cabinet.png +0 -0
- data/templates/mobile/glyphish/mini-icons/34-coffee.png +0 -0
- data/templates/mobile/glyphish/mini-icons/35-shopping-bag.png +0 -0
- data/templates/mobile/glyphish/mini-icons/36-toolbox.png +0 -0
- data/templates/mobile/glyphish/mini-icons/37-suitcase.png +0 -0
- data/templates/mobile/glyphish/mini-icons/38-airplane.png +0 -0
- data/templates/mobile/glyphish/mini-icons/39-spraycan.png +0 -0
- data/templates/mobile/glyphish/mini-icons/40-inbox.png +0 -0
- data/templates/mobile/glyphish/mini-icons/41-picture-frame.png +0 -0
- data/templates/mobile/glyphish/mini-icons/42-photos.png +0 -0
- data/templates/mobile/glyphish/mini-icons/43-film-roll.png +0 -0
- data/templates/mobile/glyphish/mini-icons/44-shoebox.png +0 -0
- data/templates/mobile/glyphish/mini-icons/45-movie1.png +0 -0
- data/templates/mobile/glyphish/mini-icons/46-movie2.png +0 -0
- data/templates/mobile/glyphish/mini-icons/47-fuel.png +0 -0
- data/templates/mobile/glyphish/mini-icons/48-fork-and-knife.png +0 -0
- data/templates/mobile/glyphish/mini-icons/49-battery.png +0 -0
- data/templates/mobile/glyphish/mini-icons/50-beaker.png +0 -0
- data/templates/mobile/glyphish/mini-icons/51-outlet.png +0 -0
- data/templates/mobile/glyphish/mini-icons/52-pinetree.png +0 -0
- data/templates/mobile/glyphish/mini-icons/53-house.png +0 -0
- data/templates/mobile/glyphish/mini-icons/54-lock.png +0 -0
- data/templates/mobile/glyphish/mini-icons/55-network.png +0 -0
- data/templates/mobile/glyphish/mini-icons/56-cloud.png +0 -0
- data/templates/mobile/glyphish/mini-icons/57-download.png +0 -0
- data/templates/mobile/glyphish/mini-icons/58-bookmark.png +0 -0
- data/templates/mobile/glyphish/mini-icons/59-flag.png +0 -0
- data/templates/mobile/glyphish/mini-icons/60-signpost.png +0 -0
- data/templates/mobile/glyphish/mini-icons/61-brightness.png +0 -0
- data/templates/mobile/glyphish/mini-icons/62-contrast.png +0 -0
- data/templates/mobile/glyphish/mini-icons/63-runner.png +0 -0
- data/templates/mobile/glyphish/mini-icons/64-zap.png +0 -0
- data/templates/mobile/glyphish/mini-icons/65-note.png +0 -0
- data/templates/mobile/glyphish/mini-icons/66-microphone.png +0 -0
- data/templates/mobile/glyphish/mini-icons/67-tshirt.png +0 -0
- data/templates/mobile/glyphish/mini-icons/68-paperclip.png +0 -0
- data/templates/mobile/glyphish/mini-icons/69-display.png +0 -0
- data/templates/mobile/glyphish/mini-icons/70-tv.png +0 -0
- data/templates/mobile/glyphish/mini-icons/71-compass.png +0 -0
- data/templates/mobile/glyphish/mini-icons/72-pin.png +0 -0
- data/templates/mobile/glyphish/mini-icons/73-radar.png +0 -0
- data/templates/mobile/glyphish/mini-icons/74-location.png +0 -0
- data/templates/mobile/glyphish/mini-icons/75-phone.png +0 -0
- data/templates/mobile/glyphish/mini-icons/76-baby.png +0 -0
- data/templates/mobile/glyphish/mini-icons/77-ekg.png +0 -0
- data/templates/mobile/glyphish/mini-icons/78-stopwatch.png +0 -0
- data/templates/mobile/glyphish/mini-icons/79-medical-bag.png +0 -0
- data/templates/mobile/glyphish/mini-icons/80-shopping-cart.png +0 -0
- data/templates/mobile/glyphish/mini-icons/81-dashboard.png +0 -0
- data/templates/mobile/glyphish/mini-icons/82-dogpaw.png +0 -0
- data/templates/mobile/glyphish/mini-icons/83-calendar.png +0 -0
- data/templates/mobile/glyphish/mini-icons/84-lightbulb.png +0 -0
- data/templates/mobile/glyphish/mini-icons/85-trophy.png +0 -0
- data/templates/mobile/glyphish/mini-icons/86-camera.png +0 -0
- data/templates/mobile/glyphish/mini-icons/87-wineglass.png +0 -0
- data/templates/mobile/glyphish/mini-icons/88-beermug.png +0 -0
- data/templates/mobile/glyphish/mini-icons/89-dumbbell.png +0 -0
- data/templates/mobile/glyphish/mini-icons/90-lifebuoy.png +0 -0
- data/templates/mobile/glyphish/mini-icons/91-beaker2.png +0 -0
- data/templates/mobile/glyphish/mini-icons/92-testtube.png +0 -0
- data/templates/mobile/glyphish/mini-icons/93-thermometer.png +0 -0
- data/templates/mobile/glyphish/mini-icons/94-pill.png +0 -0
- data/templates/mobile/glyphish/mini-icons/95-equalizer.png +0 -0
- data/templates/mobile/glyphish/mini-icons/96-book.png +0 -0
- data/templates/mobile/glyphish/mini-icons/97-puzzle.png +0 -0
- data/templates/mobile/glyphish/mini-icons/98-palette.png +0 -0
- data/templates/mobile/glyphish/mini-icons/99-umbrella.png +0 -0
- data/templates/mobile/jquery/mobile/_base.scss +0 -1325
- 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-arrow-white-down.png +0 -0
- data/templates/mobile/jquery/mobile/default/icon-arrow-white-left.png +0 -0
- data/templates/mobile/jquery/mobile/default/icon-arrow-white-right.png +0 -0
- data/templates/mobile/jquery/mobile/default/icon-arrow-white-up.png +0 -0
- data/templates/mobile/jquery/mobile/default/icon-delete.png +0 -0
- data/templates/mobile/jquery/mobile/default/icon-minus-white.png +0 -0
- data/templates/mobile/jquery/mobile/default/icon-plus-white.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/default.scss +0 -742
- 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-arrow-white-down.png +0 -0
- data/templates/mobile/jquery/mobile/valencia/icon-arrow-white-left.png +0 -0
- data/templates/mobile/jquery/mobile/valencia/icon-arrow-white-right.png +0 -0
- data/templates/mobile/jquery/mobile/valencia/icon-arrow-white-up.png +0 -0
- data/templates/mobile/jquery/mobile/valencia/icon-delete.png +0 -0
- data/templates/mobile/jquery/mobile/valencia/icon-minus-white.png +0 -0
- data/templates/mobile/jquery/mobile/valencia/icon-plus-white.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/jquery/mobile/valencia.scss +0 -804
- data/templates/mobile/jquery.mobile.js +0 -3390
- data/templates/mobile/jquery.mobile.min.js +0 -28
- data/templates/mobile/lib/tasks/jquery.mobile.rake +0 -106
- data/templates/mobile/manifest.rb +0 -307
- data/templates/secret_sauce/app/views/shared/_ui_form_error_messages.html.haml +0 -6
- data/templates/secret_sauce/app/views/shared/_ui_grid_for_without_block.js.haml +0 -144
- data/templates/secret_sauce/app/views/shared/_ui_static_dialog.html.haml +0 -6
- data/templates/secret_sauce/config/initializers/secret_sauce.rb +0 -8
- data/templates/secret_sauce/jquery/secret_sauce.scss +0 -33
- data/templates/secret_sauce/manifest.rb +0 -10
- data/templates/secret_sauce/secret_sauce.js +0 -12
- data/templates/secret_sauce/secret_sauce.min.js +0 -1
@@ -1,435 +0,0 @@
|
|
1
|
-
# reference: http://github.com/ahe/2dc_jqgrid
|
2
|
-
|
3
|
-
module Gridify
|
4
|
-
class Grid
|
5
|
-
|
6
|
-
# ----------------------
|
7
|
-
# generate the grid javascript for a view
|
8
|
-
# options:
|
9
|
-
# :script => true generates <script> tag (true)
|
10
|
-
# :ready => true generates jquery ready function (true)
|
11
|
-
def to_javascript( options={} )
|
12
|
-
options = { :script => true, :ready => true }.merge(options)
|
13
|
-
|
14
|
-
s = ''
|
15
|
-
if options[:script]
|
16
|
-
s << %Q^
|
17
|
-
<script type="text/javascript">
|
18
|
-
var lastsel_#{dom_id};
|
19
|
-
^
|
20
|
-
end
|
21
|
-
|
22
|
-
s << js_helpers
|
23
|
-
|
24
|
-
if options[:ready]
|
25
|
-
s << %Q^
|
26
|
-
jQuery(document).ready(function(){
|
27
|
-
^
|
28
|
-
end
|
29
|
-
|
30
|
-
s << jqgrid_javascript(options)
|
31
|
-
|
32
|
-
if options[:ready]
|
33
|
-
s << %Q^
|
34
|
-
});
|
35
|
-
^
|
36
|
-
end
|
37
|
-
if options[:script]
|
38
|
-
s << %Q^
|
39
|
-
</script>
|
40
|
-
^
|
41
|
-
end
|
42
|
-
s
|
43
|
-
end
|
44
|
-
|
45
|
-
def to_json
|
46
|
-
jqgrid_properties.to_json_with_js
|
47
|
-
end
|
48
|
-
|
49
|
-
# alias :to_s, :to_javascript
|
50
|
-
def to_s( options={} )
|
51
|
-
to_javascript( options )
|
52
|
-
end
|
53
|
-
|
54
|
-
# ------------------
|
55
|
-
protected
|
56
|
-
# ------------------
|
57
|
-
|
58
|
-
# //{ url: '/notes/{id}', mtype: 'PUT', reloadAfterSubmit: false, closeAfterEdit: true }, // edit settings
|
59
|
-
# //{ url: '/notes', mtype: 'POST', reloadAfterSubmit: false, closeAfterEdit: true }, // add settings
|
60
|
-
# //{ url: '/notes/{id}', mtype: 'DELETE', reloadAfterSubmit: false }, // delete settings
|
61
|
-
|
62
|
-
# get the button options
|
63
|
-
def edit_button_options
|
64
|
-
# 'url' => '/notes/{id}', 'mtype' => 'PUT'
|
65
|
-
# {afterSubmit:function(r,data){return #{options[:error_handler_return_value]}(r,data,'edit');}},
|
66
|
-
|
67
|
-
# note, closeAfterEdit will not close if response returns a non-empty string (even if "success" message)
|
68
|
-
merge_options_defaults( edit_button || inline_edit,
|
69
|
-
'reloadAfterSubmit' => true,
|
70
|
-
'closeAfterEdit' => true,
|
71
|
-
'afterSubmit' => "javascript: function(r,data){return #{error_handler_return_value}(r,data,'edit');}"
|
72
|
-
)
|
73
|
-
end
|
74
|
-
|
75
|
-
def add_button_options
|
76
|
-
# 'url' => '/notes', 'mtype' => 'POST'
|
77
|
-
merge_options_defaults( add_button,
|
78
|
-
'reloadAfterSubmit' => true,
|
79
|
-
'closeAfterAdd' => true,
|
80
|
-
'afterSubmit' => "javascript: function(r,data){return #{error_handler_return_value}(r,data,'add');}"
|
81
|
-
)
|
82
|
-
end
|
83
|
-
|
84
|
-
def delete_button_options
|
85
|
-
# 'url' => '/notes/{id}', 'mtype' => 'DELETE'
|
86
|
-
merge_options_defaults( delete_button,
|
87
|
-
'reloadAfterSubmit' => true,
|
88
|
-
'afterSubmit' => "javascript: function(r,data){return #{error_handler_return_value}(r,data,'delete');}"
|
89
|
-
)
|
90
|
-
end
|
91
|
-
|
92
|
-
def search_button_options
|
93
|
-
if search_advanced
|
94
|
-
merge_options_defaults( search_advanced, 'multipleSearch' => true)
|
95
|
-
else
|
96
|
-
merge_options_defaults( search_button)
|
97
|
-
end
|
98
|
-
end
|
99
|
-
|
100
|
-
def view_button_options
|
101
|
-
merge_options_defaults( view_button)
|
102
|
-
end
|
103
|
-
|
104
|
-
# generate the jqGrid initial values in json
|
105
|
-
# maps our attributes to jqGrid options; omit values when same as jqGrid defaults
|
106
|
-
def jqgrid_properties
|
107
|
-
vals = {}
|
108
|
-
vals[:ajaxGridOptions] = ajax_grid_options if ajax_grid_options
|
109
|
-
|
110
|
-
# data and request options
|
111
|
-
vals[:url] = url if url
|
112
|
-
vals[:editurl] = url if editable
|
113
|
-
vals[:restful] = true if restful
|
114
|
-
vals[:inline_edit] = inline_edit if inline_edit.present?
|
115
|
-
vals[:postData] = { :grid => name, :datatype => data_type } #identify which grid making the request
|
116
|
-
vals[:colNames] = colNames if colNames.present?
|
117
|
-
vals[:colModel] = column_model if colModel.present?
|
118
|
-
vals[:datatype] = data_type if data_type
|
119
|
-
if data_format.present?
|
120
|
-
case data_type
|
121
|
-
when :xml
|
122
|
-
vals[:xmlReader] = data_format
|
123
|
-
when :json
|
124
|
-
vals[:jsonReader] = data_format
|
125
|
-
end
|
126
|
-
end
|
127
|
-
|
128
|
-
vals[:loadonce] = load_once if load_once
|
129
|
-
|
130
|
-
vals[:sortname] = sort_by if sort_by
|
131
|
-
vals[:sortorder] = sort_order if sort_order && sort_by
|
132
|
-
vals[:rowNum] = rows_per_page if rows_per_page
|
133
|
-
vals[:rowTotal] = total_rows if total_rows
|
134
|
-
vals[:page] = current_page if current_page
|
135
|
-
|
136
|
-
# grid options
|
137
|
-
vals[:height] = height if height
|
138
|
-
vals[:gridview] = grid_view # faster views, NOTE theres cases when this needs to be disabled
|
139
|
-
|
140
|
-
case width_fit
|
141
|
-
when :fitted
|
142
|
-
#vals[:autowidth] = false #default
|
143
|
-
#vals[:shrinkToFit] = true #default
|
144
|
-
vals[:forceFit] = true
|
145
|
-
vals[:width] = width if width
|
146
|
-
|
147
|
-
when :scroll
|
148
|
-
#vals[:autowidth] = false #default
|
149
|
-
vals[:shrinkToFit] = false
|
150
|
-
#vals[:forceFit] = #ignored by jqGrid
|
151
|
-
vals[:width] = width if width
|
152
|
-
|
153
|
-
else #when :fluid
|
154
|
-
vals[:autowidth] = true
|
155
|
-
#vals[:shrinkToFit] = true #default
|
156
|
-
vals[:forceFit] = true
|
157
|
-
#vals[:width] = is ignored
|
158
|
-
vals[:resizeStop] = 'javascript: gridify_fluid_recalc_width'
|
159
|
-
end
|
160
|
-
|
161
|
-
vals[:sortable] = true if arranger_type.include?(:sortable)
|
162
|
-
|
163
|
-
# header layer
|
164
|
-
vals[:caption] = title if title
|
165
|
-
vals[:hidegrid] = false unless collapsible
|
166
|
-
vals[:hiddengrid] = true if collapsed
|
167
|
-
|
168
|
-
# row formatting
|
169
|
-
vals[:altrows] = true if alt_rows
|
170
|
-
vals[:altclass] = alt_rows if alt_rows.is_a?(String)
|
171
|
-
|
172
|
-
vals[:rownumbers] = true if row_numbers
|
173
|
-
vals[:rownumWidth] = row_numbers if row_numbers.is_a?(Numeric)
|
174
|
-
|
175
|
-
if inline_edit
|
176
|
-
vals[:scrollrows] = true
|
177
|
-
vals[:multiselect] = true if multi_select
|
178
|
-
vals[:onSelectRow] = "javascript: function(id, status) { if(id && id!==lastsel_#{dom_id}) { jQuery('##{dom_id}').jqGrid('restoreRow', lastsel_#{dom_id}); jQuery('##{dom_id}').jqGrid('editRow', id, true, #{inline_edit_handler}, #{error_handler}); lastsel_#{dom_id}=id}}"
|
179
|
-
elsif select_rows #.present?
|
180
|
-
vals[:scrollrows] = true
|
181
|
-
vals[:onSelectRow] = select_rows
|
182
|
-
vals[:multiselect] = true if multi_select
|
183
|
-
else
|
184
|
-
vals[:hoverrows] = false
|
185
|
-
vals[:beforeSelectRow] = "javascript: function(){ false; }"
|
186
|
-
end
|
187
|
-
|
188
|
-
# pager layer
|
189
|
-
if pager
|
190
|
-
vals[:pager] = "##{pager}"
|
191
|
-
vals[:viewrecords] = true # display total records in the query (eg "1 - 10 of 25")
|
192
|
-
vals[:rowList] = paging_choices
|
193
|
-
if paging_controls.is_a?(Hash)
|
194
|
-
# allow override of jqGrid pager options
|
195
|
-
vals.merge!(paging_controls)
|
196
|
-
elsif !paging_controls
|
197
|
-
vals[:rowList] = []
|
198
|
-
vals[:pgbuttons] = false
|
199
|
-
vals[:pginput] = false
|
200
|
-
vals[:recordtext] = "{2} records"
|
201
|
-
end
|
202
|
-
end
|
203
|
-
|
204
|
-
#subgrid
|
205
|
-
if sub_grid
|
206
|
-
vals[:subGrid] = sub_grid
|
207
|
-
vals[:subGridUrl] = sub_grid_url
|
208
|
-
vals[:subGridModel] = sub_grid_model
|
209
|
-
vals[:gridview] = false
|
210
|
-
end
|
211
|
-
|
212
|
-
#events
|
213
|
-
#vals[:serializeGridData] = serialize_grid_data if serialize_grid_data
|
214
|
-
|
215
|
-
vals[:loadonce] = load_once if load_once
|
216
|
-
|
217
|
-
# allow override of native jqGrid options
|
218
|
-
vals.merge(jqgrid_options)
|
219
|
-
|
220
|
-
|
221
|
-
end
|
222
|
-
|
223
|
-
# -----------------
|
224
|
-
def jqgrid_javascript( options={} )
|
225
|
-
s = ''
|
226
|
-
|
227
|
-
if table_to_grid
|
228
|
-
s << %Q^
|
229
|
-
tableToGrid("##{dom_id}", #{to_json});
|
230
|
-
^
|
231
|
-
s << %Q^
|
232
|
-
grid_#{dom_id} = jQuery("##{dom_id}")
|
233
|
-
^
|
234
|
-
else
|
235
|
-
s << %Q^
|
236
|
-
grid_#{dom_id} = jQuery("##{dom_id}").jqGrid(#{to_json})
|
237
|
-
^
|
238
|
-
end
|
239
|
-
|
240
|
-
s << ';'
|
241
|
-
|
242
|
-
# tag the grid as fluid so we can find it on resize events
|
243
|
-
if width_fit == :fluid
|
244
|
-
s << %Q^
|
245
|
-
jQuery("##{dom_id}").addClass("fluid");
|
246
|
-
^
|
247
|
-
end
|
248
|
-
|
249
|
-
# override tableToGrid colmodel options as needed (sortable)
|
250
|
-
#s << %Q^ .jqGrid('setColProp','Title',{sortable: false})^
|
251
|
-
|
252
|
-
# resize method
|
253
|
-
if resizable
|
254
|
-
s << %Q^
|
255
|
-
jQuery("##{dom_id}").jqGrid('gridResize', #{resizable.to_json});
|
256
|
-
^
|
257
|
-
end
|
258
|
-
|
259
|
-
# pager buttons (navGrid)
|
260
|
-
if pager
|
261
|
-
nav_params = {
|
262
|
-
'edit' => edit_button.present?,
|
263
|
-
'add' => add_button.present?,
|
264
|
-
'del' => delete_button.present?,
|
265
|
-
'search' => search_button.present? || search_advanced.present?,
|
266
|
-
'view' => view_button.present?,
|
267
|
-
'refresh' => refresh_button.present?
|
268
|
-
}.merge(jqgrid_nav_options||{})
|
269
|
-
|
270
|
-
s << %Q^
|
271
|
-
jQuery("##{dom_id}").jqGrid('navGrid', '##{pager}',
|
272
|
-
#{nav_params.to_json},
|
273
|
-
#{edit_button_options.to_json_with_js},
|
274
|
-
#{add_button_options.to_json_with_js},
|
275
|
-
#{delete_button_options.to_json_with_js},
|
276
|
-
#{search_button_options.to_json_with_js},
|
277
|
-
#{view_button_options.to_json_with_js}
|
278
|
-
);
|
279
|
-
^
|
280
|
-
end
|
281
|
-
|
282
|
-
if arranger_type.include?(:hide_show)
|
283
|
-
s << %Q^
|
284
|
-
jQuery("##{dom_id}").jqGrid('navButtonAdd','##{pager}',{
|
285
|
-
caption: "Columns",
|
286
|
-
title: "Hide/Show Columns",
|
287
|
-
onClickButton : function (){ jQuery("##{dom_id}").jqGrid('setColumns',
|
288
|
-
#{arranger_options(:hide_show).to_json_with_js} );
|
289
|
-
}
|
290
|
-
});
|
291
|
-
^
|
292
|
-
end
|
293
|
-
if arranger_type.include?(:chooser)
|
294
|
-
# hackey way to build the string but gets it done
|
295
|
-
chooser_code = %Q^ function (){ jQuery('##{dom_id}').jqGrid('columnChooser', {
|
296
|
-
done : function (perm) {
|
297
|
-
if (perm) {
|
298
|
-
this.jqGrid('remapColumns', perm, true);
|
299
|
-
var gwdth = this.jqGrid('getGridParam','width');
|
300
|
-
this.jqGrid('setGridWidth',gwdth);
|
301
|
-
}
|
302
|
-
} })}^
|
303
|
-
chooser_opts = {
|
304
|
-
'caption' => 'Columns',
|
305
|
-
'title' => 'Arrange Columns',
|
306
|
-
'onClickButton' => 'chooser_code'
|
307
|
-
}.merge(arranger_options(:chooser))
|
308
|
-
s << %Q^
|
309
|
-
jQuery("##{dom_id}").jqGrid('navButtonAdd','##{pager}', #{chooser_opts.to_json.gsub('"chooser_code"', chooser_code)} );
|
310
|
-
^
|
311
|
-
end
|
312
|
-
|
313
|
-
if search_toolbar
|
314
|
-
# I wish we could put this in the header rather than the pager
|
315
|
-
s << %Q^
|
316
|
-
jQuery("##{dom_id}").jqGrid('navButtonAdd',"##{pager}", { caption:"Toggle", title:"Toggle Search Toolbar", buttonicon: 'ui-icon-pin-s', onClickButton: function(){ grid_#{dom_id}[0].toggleToolbar() } });
|
317
|
-
jQuery("##{dom_id}").jqGrid('navButtonAdd',"##{pager}", { caption:"Clear", title:"Clear Search", buttonicon: 'ui-icon-refresh', onClickButton: function(){ grid_#{dom_id}[0].clearToolbar() } });
|
318
|
-
jQuery("##{dom_id}").jqGrid('filterToolbar');
|
319
|
-
^
|
320
|
-
end
|
321
|
-
|
322
|
-
if sortable_rows
|
323
|
-
# I wish we could put this in the header rather than the pager
|
324
|
-
s << %Q^
|
325
|
-
jQuery("##{dom_id}").jqGrid('sortableRows');
|
326
|
-
^
|
327
|
-
end
|
328
|
-
|
329
|
-
# TODO: built in event handlers, eg
|
330
|
-
# loadError
|
331
|
-
# onSelectRow, onDblClickRow, onRightClickRow etc
|
332
|
-
|
333
|
-
#unless search_toolbar == :visible
|
334
|
-
# s << %Q^
|
335
|
-
# grid_#{dom_id}[0].toggleToolbar();
|
336
|
-
# ^
|
337
|
-
#end
|
338
|
-
|
339
|
-
# # keep page controls centered (jqgrid bug) [eg appears when :width_fit => :scroll]
|
340
|
-
# s << %Q^ $("##{pager}_left").css("width", "auto"); ^
|
341
|
-
|
342
|
-
s
|
343
|
-
end
|
344
|
-
|
345
|
-
# ------------------
|
346
|
-
def js_helpers
|
347
|
-
# just move this into appliaction.js?
|
348
|
-
|
349
|
-
# gridify_fluid_recalc_width: allow grid resize on window resize events
|
350
|
-
# recalculate width of grid based on parent container; handles multiple grids
|
351
|
-
# ref: http://www.trirand.com/blog/?page_id=393/feature-request/Resizable%20grid/
|
352
|
-
|
353
|
-
# afterSubmit: display error message in response
|
354
|
-
|
355
|
-
%Q^
|
356
|
-
function gridify_fluid_recalc_width(){
|
357
|
-
if (grids = jQuery('.fluid.ui-jqgrid-btable:visible')) {
|
358
|
-
grids.each(function(index) {
|
359
|
-
gridId = jQuery(this).attr('id');
|
360
|
-
gridParentWidth = jQuery('#gbox_' + gridId).parent().width();
|
361
|
-
jQuery('#' + gridId).jqGrid('setGridWidth', gridParentWidth);
|
362
|
-
});
|
363
|
-
}
|
364
|
-
};
|
365
|
-
|
366
|
-
jQuery(window).live('resize', gridify_fluid_recalc_width);
|
367
|
-
function gridify_action_error_handler(r, data, action){
|
368
|
-
if (r.responseText != '') {
|
369
|
-
return [false, r.responseText];
|
370
|
-
} else {
|
371
|
-
return true;
|
372
|
-
}
|
373
|
-
}
|
374
|
-
^
|
375
|
-
end
|
376
|
-
|
377
|
-
|
378
|
-
# if(r.responseText != "") {
|
379
|
-
# $('#{error_container}').html(r.responseText);
|
380
|
-
# $('#{error_container}').slideDown();
|
381
|
-
# //window.setTimeout(function() { // Hide error div after 6 seconds
|
382
|
-
# // $('#{error_container}').slideUp();
|
383
|
-
# //}, 6000);
|
384
|
-
# return false;
|
385
|
-
# }
|
386
|
-
# return true;
|
387
|
-
|
388
|
-
# lets options be true or a hash, merges into defaults and returns a hash
|
389
|
-
def merge_options_defaults( options, defaults={} )
|
390
|
-
if options
|
391
|
-
defaults.merge( options==true ? {} : options)
|
392
|
-
else
|
393
|
-
{}
|
394
|
-
end
|
395
|
-
end
|
396
|
-
|
397
|
-
end
|
398
|
-
end
|
399
|
-
|
400
|
-
class Hash
|
401
|
-
# replace embedded '"javascript: foo"' with 'foo'
|
402
|
-
def to_json_with_js
|
403
|
-
self.to_json.gsub(/\"javascript: ([^"]*)\"/) {|string| string[1..-2].gsub('javascript:','') }
|
404
|
-
end
|
405
|
-
end
|
406
|
-
|
407
|
-
module JqgridJson
|
408
|
-
include ActionView::Helpers::JavaScriptHelper
|
409
|
-
include HandleAttributes
|
410
|
-
|
411
|
-
def to_subgrid_json(attributes)
|
412
|
-
json = %Q({)
|
413
|
-
if self.empty?
|
414
|
-
json << "}"
|
415
|
-
else
|
416
|
-
json <<= %Q("rows":[)
|
417
|
-
each do |elem|
|
418
|
-
elem.id ||= index(elem)
|
419
|
-
json << %Q({"id":"#{elem.id}","cell":[)
|
420
|
-
couples = elem.attributes.symbolize_keys
|
421
|
-
attributes.each do |atr|
|
422
|
-
value = get_atr_value(elem, atr, couples)
|
423
|
-
value = escape_javascript(value) if value and value.is_a? String
|
424
|
-
json << %Q("#{value}",)
|
425
|
-
end
|
426
|
-
json.chop! << "]},"
|
427
|
-
end
|
428
|
-
json.chop! << "]}"
|
429
|
-
end
|
430
|
-
end
|
431
|
-
end
|
432
|
-
|
433
|
-
class Array
|
434
|
-
include JqgridJson
|
435
|
-
end
|
data/lib/jquery/gridify.rb
DELETED
@@ -1,42 +0,0 @@
|
|
1
|
-
require 'jquery/gridify/grid'
|
2
|
-
|
3
|
-
module Gridify
|
4
|
-
|
5
|
-
def self.included(base)
|
6
|
-
base.extend(ClassMethods)
|
7
|
-
end
|
8
|
-
|
9
|
-
module ClassMethods
|
10
|
-
attr_accessor :grids
|
11
|
-
|
12
|
-
def gridify(*args, &block)
|
13
|
-
# debugger
|
14
|
-
grid = Gridify::Grid.new( self, *args, &block)
|
15
|
-
@grids ||= {}
|
16
|
-
@grids[grid.name.to_sym] = grid
|
17
|
-
|
18
|
-
unless self.respond_to?(:find_for_grid)
|
19
|
-
class_eval <<-EOV
|
20
|
-
named_scope :find_for_grid, lambda {|name, params|
|
21
|
-
grid = grids[name]
|
22
|
-
grid.update_from_params( params )
|
23
|
-
grid.current_scope
|
24
|
-
}
|
25
|
-
EOV
|
26
|
-
end
|
27
|
-
end
|
28
|
-
|
29
|
-
def grids
|
30
|
-
@grids || {}
|
31
|
-
end
|
32
|
-
|
33
|
-
def grid(name=nil)
|
34
|
-
name ? grids[name] : grids[:grid]
|
35
|
-
end
|
36
|
-
end
|
37
|
-
end
|
38
|
-
|
39
|
-
class ActiveRecord::Base
|
40
|
-
include Gridify
|
41
|
-
end
|
42
|
-
|