alchemy_cms 2.3.2 → 2.4.beta2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (164) hide show
  1. data/.gitignore +1 -2
  2. data/.travis.yml +1 -5
  3. data/Gemfile +4 -4
  4. data/README.md +22 -15
  5. data/alchemy_cms.gemspec +38 -38
  6. data/app/assets/javascripts/alchemy/alchemy.base.js +2 -2
  7. data/app/assets/javascripts/alchemy/alchemy.buttons.js.coffee +31 -0
  8. data/app/assets/javascripts/alchemy/alchemy.dragndrop.js +1 -1
  9. data/app/assets/javascripts/alchemy/alchemy.elements_window.js +24 -15
  10. data/app/assets/javascripts/alchemy/alchemy.gui.js.coffee +9 -3
  11. data/app/assets/javascripts/alchemy/alchemy.jquery_loader.js +2 -2
  12. data/app/assets/javascripts/alchemy/alchemy.js +1 -0
  13. data/app/assets/javascripts/alchemy/alchemy.menubar.js +4 -12
  14. data/app/assets/javascripts/alchemy/alchemy.onload.js.coffee +32 -0
  15. data/app/assets/javascripts/alchemy/alchemy.windows.js +4 -4
  16. data/app/assets/stylesheets/alchemy/_defaults.scss +0 -1
  17. data/app/assets/stylesheets/alchemy/alchemy.css +2 -1
  18. data/app/assets/stylesheets/alchemy/base.css.scss +2 -54
  19. data/app/assets/stylesheets/alchemy/elements.css.scss +8 -5
  20. data/app/assets/stylesheets/alchemy/errors.css.scss +51 -0
  21. data/app/assets/stylesheets/alchemy/flash.css.scss +0 -2
  22. data/app/assets/stylesheets/alchemy/form_elements.css.scss +31 -75
  23. data/app/assets/stylesheets/alchemy/icons.css.scss +5 -5
  24. data/app/assets/stylesheets/alchemy/menubar.css.scss +0 -2
  25. data/app/assets/stylesheets/alchemy/sitemap.css.scss +0 -1
  26. data/app/assets/stylesheets/alchemy/tables.css.scss +3 -1
  27. data/app/controllers/alchemy/admin/base_controller.rb +19 -12
  28. data/app/controllers/alchemy/admin/elements_controller.rb +52 -24
  29. data/app/controllers/alchemy/admin/pages_controller.rb +11 -5
  30. data/app/controllers/alchemy/admin/resources_controller.rb +3 -4
  31. data/app/controllers/alchemy/admin/users_controller.rb +1 -0
  32. data/app/controllers/alchemy/base_controller.rb +34 -8
  33. data/app/controllers/alchemy/pictures_controller.rb +16 -1
  34. data/app/controllers/alchemy/user_sessions_controller.rb +6 -1
  35. data/app/helpers/alchemy/base_helper.rb +14 -0
  36. data/app/helpers/alchemy/elements_helper.rb +10 -5
  37. data/app/helpers/alchemy/pages_helper.rb +1 -2
  38. data/app/helpers/alchemy/url_helper.rb +43 -24
  39. data/app/models/alchemy/element.rb +23 -16
  40. data/app/models/alchemy/page.rb +25 -14
  41. data/app/models/alchemy/picture.rb +24 -0
  42. data/app/views/alchemy/admin/contents/create.js.erb +1 -1
  43. data/app/views/alchemy/admin/elements/_new_element_form.html.erb +1 -1
  44. data/app/views/alchemy/admin/elements/create.js.erb +11 -3
  45. data/app/views/alchemy/admin/elements/fold.js.erb +1 -1
  46. data/app/views/alchemy/admin/elements/new.html.erb +1 -1
  47. data/app/views/alchemy/admin/elements/update.js.erb +1 -1
  48. data/app/views/alchemy/admin/essence_pictures/crop.html.erb +1 -1
  49. data/app/views/alchemy/admin/languages/_form.html.erb +1 -1
  50. data/app/views/alchemy/admin/pages/_new_page_form.html.erb +1 -1
  51. data/app/views/alchemy/admin/pages/_page.html.erb +1 -1
  52. data/app/views/alchemy/admin/pages/configure.html.erb +10 -6
  53. data/app/views/alchemy/admin/pages/configure_external.html.erb +1 -1
  54. data/app/views/alchemy/admin/pages/edit.html.erb +1 -2
  55. data/app/views/alchemy/admin/pages/new.html.erb +2 -2
  56. data/app/views/alchemy/admin/pages/update.js.erb +10 -2
  57. data/app/views/alchemy/admin/partials/_sub_navigation_tab.html.erb +5 -5
  58. data/app/views/alchemy/admin/pictures/_filter_bar.html.erb +2 -1
  59. data/app/views/alchemy/admin/pictures/_picture.html.erb +2 -2
  60. data/app/views/alchemy/admin/pictures/_picture_to_assign.html.erb +2 -1
  61. data/app/views/alchemy/admin/pictures/show_in_window.html.erb +3 -2
  62. data/app/views/alchemy/admin/resources/_form.html.erb +1 -1
  63. data/app/views/alchemy/admin/users/_table.html.erb +4 -4
  64. data/app/views/alchemy/admin/users/edit.html.erb +1 -1
  65. data/app/views/alchemy/admin/users/new.html.erb +1 -1
  66. data/app/views/alchemy/base/error_notice.js.erb +1 -1
  67. data/app/views/alchemy/base/remote_errors.js.erb +2 -3
  68. data/app/views/alchemy/essences/_essence_picture_editor.html.erb +10 -7
  69. data/app/views/alchemy/essences/_essence_picture_view.html.erb +24 -21
  70. data/app/views/layouts/alchemy/admin.html.erb +9 -31
  71. data/bin/alchemy +20 -24
  72. data/config/alchemy/config.yml +6 -0
  73. data/config/alchemy/page_layouts.yml +2 -0
  74. data/config/authorization_rules.rb +1 -1
  75. data/config/locales/alchemy.de.yml +3 -0
  76. data/config/locales/alchemy.en.yml +4 -1
  77. data/db/migrate/20121026100815_alchemy_two_point_three.rb +312 -0
  78. data/lib/alchemy/mount_point.rb +9 -3
  79. data/lib/alchemy/page_layout.rb +89 -73
  80. data/lib/alchemy/version.rb +1 -1
  81. data/lib/rails/generators/alchemy/deploy_script/deploy_script_generator.rb +45 -12
  82. data/lib/rails/generators/alchemy/deploy_script/templates/deploy.rb.tt +3 -1
  83. data/lib/rails/generators/alchemy/essence/essence_generator.rb +51 -0
  84. data/lib/rails/generators/alchemy/essence/templates/editor.html.erb +18 -0
  85. data/lib/rails/generators/alchemy/essence/templates/view.html.erb +2 -0
  86. data/lib/rails/templates/alchemy.rb +1 -1
  87. data/lib/tasks/install.rake +57 -2
  88. data/spec/controllers/admin/elements_controller_spec.rb +170 -22
  89. data/spec/controllers/admin/trash_controller_spec.rb +1 -1
  90. data/spec/controllers/admin/users_controller_spec.rb +36 -0
  91. data/spec/controllers/base_controller_spec.rb +12 -1
  92. data/spec/controllers/elements_controller_spec.rb +17 -13
  93. data/spec/controllers/pictures_controller_spec.rb +4 -4
  94. data/spec/dummy/config/application.rb +1 -1
  95. data/spec/dummy/db/migrate/20121026100815_alchemy_two_point_three.rb +312 -0
  96. data/spec/dummy/db/migrate/20121026104128_create_events.rb +19 -0
  97. data/spec/dummy/db/schema.rb +1 -1
  98. data/spec/factories.rb +0 -1
  99. data/spec/helpers/base_helper_spec.rb +48 -0
  100. data/spec/helpers/elements_helper_spec.rb +14 -3
  101. data/spec/helpers/url_helper_spec.rb +8 -3
  102. data/spec/integration/picture_security_spec.rb +35 -0
  103. data/spec/integration/translation_integration_spec.rb +6 -5
  104. data/spec/models/element_spec.rb +5 -5
  105. data/spec/models/page_layout_spec.rb +10 -16
  106. data/spec/models/page_spec.rb +25 -2
  107. data/spec/models/picture_spec.rb +24 -2
  108. data/spec/routing_spec.rb +115 -115
  109. data/spec/support/alchemy/specs_helpers.rb +4 -4
  110. data/{app/assets/images/alchemy → vendor/assets/images}/Jcrop.gif +0 -0
  111. data/vendor/assets/javascripts/jquery_plugins/jquery.Jcrop.min.js +19 -243
  112. data/vendor/assets/javascripts/jquery_plugins/jquery.selectboxit.min.js +1 -0
  113. data/vendor/assets/javascripts/jquery_plugins/jquery.ui.tabspaging.js +6 -6
  114. data/vendor/assets/stylesheets/jquery.Jcrop.min.css +28 -0
  115. metadata +48 -82
  116. data/app/assets/javascripts/alchemy/alchemy.buttons.js +0 -50
  117. data/app/assets/stylesheets/alchemy/jquery.Jcrop.css.scss +0 -54
  118. data/app/helpers/alchemy/pictures_helper.rb +0 -19
  119. data/db/migrate/20100607143125_create_pages.rb +0 -34
  120. data/db/migrate/20100607144254_create_elements.rb +0 -20
  121. data/db/migrate/20100607145256_create_contents.rb +0 -18
  122. data/db/migrate/20100607145719_create_users.rb +0 -32
  123. data/db/migrate/20100607150611_create_pictures.rb +0 -16
  124. data/db/migrate/20100607150812_create_attachments.rb +0 -16
  125. data/db/migrate/20100607153647_create_folded_pages.rb +0 -13
  126. data/db/migrate/20100607161345_create_essence_texts.rb +0 -19
  127. data/db/migrate/20100607162339_create_elements_pages.rb +0 -12
  128. data/db/migrate/20100607193638_create_essence_pictures.rb +0 -23
  129. data/db/migrate/20100607193646_create_essence_richtexts.rb +0 -16
  130. data/db/migrate/20100607193653_create_essence_htmls.rb +0 -13
  131. data/db/migrate/20100609111653_create_essence_dates.rb +0 -13
  132. data/db/migrate/20100609111809_create_essence_files.rb +0 -15
  133. data/db/migrate/20100609111821_create_essence_flashes.rb +0 -16
  134. data/db/migrate/20100609111837_create_essence_videos.rb +0 -18
  135. data/db/migrate/20100616150753_create_essence_audios.rb +0 -17
  136. data/db/migrate/20100812085225_add_crop_from_and_crop_size_to_essence_pictures.rb +0 -11
  137. data/db/migrate/20100909140701_change_essence_htmls_source_column_type.rb +0 -9
  138. data/db/migrate/20101109150312_alter_pages_visible_column_default.rb +0 -9
  139. data/db/migrate/20101109151812_create_languages.rb +0 -19
  140. data/db/migrate/20101216151419_add_language_id_to_pages.rb +0 -27
  141. data/db/migrate/20101216155216_add_index_to_languages.rb +0 -9
  142. data/db/migrate/20101216173323_add_default_to_languages.rb +0 -9
  143. data/db/migrate/20101218130049_add_urlname_index_to_pages.rb +0 -9
  144. data/db/migrate/20110115123343_remove_css_class_default_from_essence_pictures.rb +0 -11
  145. data/db/migrate/20110224105120_change_pages_visible_default.rb +0 -11
  146. data/db/migrate/20110228182659_remove_default_page_layout_from_pages.rb +0 -11
  147. data/db/migrate/20110414163140_remove_display_name_from_elements.rb +0 -11
  148. data/db/migrate/20110511100516_rename_essence_texts_title_to_link_title.rb +0 -9
  149. data/db/migrate/20110529130429_create_cells.rb +0 -14
  150. data/db/migrate/20110529130500_add_cell_id_to_elements.rb +0 -11
  151. data/db/migrate/20110530102804_change_pages_page_layout_column.rb +0 -11
  152. data/db/migrate/20110707190728_add_render_size_to_essence_pictures.rb +0 -9
  153. data/db/migrate/20110711142057_change_open_link_in_new_window_to_link_target.rb +0 -19
  154. data/db/migrate/20110919110451_add_default_role_to_users.rb +0 -9
  155. data/db/migrate/20111116125112_namespace_alchemy_models.rb +0 -23
  156. data/db/migrate/20120216135355_add_country_code_to_languages.rb +0 -9
  157. data/db/migrate/20120608085509_create_alchemy_essence_selects.rb +0 -11
  158. data/db/migrate/20120611221734_create_alchemy_essence_booleans.rb +0 -11
  159. data/db/migrate/20120704181529_add_upload_hash_to_alchemy_picture.rb +0 -5
  160. data/db/migrate/20120705214247_acts_as_taggable_on_migration.rb +0 -28
  161. data/db/migrate/20120728185830_add_cached_tag_list_to_alchemy_pictures.rb +0 -5
  162. data/db/migrate/20120831135441_set_alchemy_languages_country_code_default_to_empty_string.rb +0 -9
  163. data/spec/helpers/pictures_helper_spec.rb +0 -14
  164. data/vendor/assets/javascripts/jquery_plugins/jquery.selectBoxIt.js +0 -1909
@@ -15,9 +15,9 @@ module Alchemy
15
15
  # * create_admin_user
16
16
  # * login_into_alchemy
17
17
  #
18
- def authorize_as_admin(locale = 'en')
18
+ def authorize_as_admin
19
19
  create_admin_user
20
- login_into_alchemy(locale)
20
+ login_into_alchemy
21
21
  end
22
22
 
23
23
  # Capybara actions to login into Alchemy Backend
@@ -26,8 +26,8 @@ module Alchemy
26
26
  #
27
27
  # See: create_admin_user method
28
28
  #
29
- def login_into_alchemy(locale = 'en')
30
- visit "/alchemy/admin/login?locale=#{locale}"
29
+ def login_into_alchemy
30
+ visit '/alchemy/admin/login'
31
31
  fill_in('alchemy_user_session_login', :with => 'jdoe')
32
32
  fill_in('alchemy_user_session_password', :with => 's3cr3t')
33
33
  click_on('Login')
@@ -1,246 +1,22 @@
1
1
  /**
2
- * jquery.Jcrop.min.js v0.9.9 (build:20110608)
3
- * jQuery Image Cropping Plugin
4
- * @author Kelly Hallman <khallman@gmail.com>
5
- * Copyright (c) 2008-2011 Kelly Hallman - released under MIT License
2
+ * jquery.Jcrop.min.js v0.9.10 (build:20120429)
3
+ * jQuery Image Cropping Plugin - released under MIT License
4
+ * Copyright (c) 2008-2012 Tapmodo Interactive LLC
6
5
  * https://github.com/tapmodo/Jcrop
7
6
  */
8
-
9
- (function($){$.Jcrop=function(obj,opt){var options=$.extend({},$.Jcrop.defaults),docOffset,lastcurs,ie6mode=false;function px(n){return parseInt(n,10)+'px';}
10
- function pct(n){return parseInt(n,10)+'%';}
11
- function cssClass(cl){return options.baseClass+'-'+cl;}
12
- function supportsColorFade(){return $.fx.step.hasOwnProperty('backgroundColor');}
13
- function getPos(obj)
14
- {var pos=$(obj).offset();return[pos.left,pos.top];}
15
- function mouseAbs(e)
16
- {return[(e.pageX-docOffset[0]),(e.pageY-docOffset[1])];}
17
- function setOptions(opt)
18
- {if(typeof(opt)!=='object'){opt={};}
19
- options=$.extend(options,opt);if(typeof(options.onChange)!=='function'){options.onChange=function(){};}
20
- if(typeof(options.onSelect)!=='function'){options.onSelect=function(){};}
21
- if(typeof(options.onRelease)!=='function'){options.onRelease=function(){};}}
22
- function myCursor(type)
23
- {if(type!==lastcurs){Tracker.setCursor(type);lastcurs=type;}}
24
- function startDragMode(mode,pos)
25
- {docOffset=getPos($img);Tracker.setCursor(mode==='move'?mode:mode+'-resize');if(mode==='move'){return Tracker.activateHandlers(createMover(pos),doneSelect);}
26
- var fc=Coords.getFixed();var opp=oppLockCorner(mode);var opc=Coords.getCorner(oppLockCorner(opp));Coords.setPressed(Coords.getCorner(opp));Coords.setCurrent(opc);Tracker.activateHandlers(dragmodeHandler(mode,fc),doneSelect);}
27
- function dragmodeHandler(mode,f)
28
- {return function(pos){if(!options.aspectRatio){switch(mode){case'e':pos[1]=f.y2;break;case'w':pos[1]=f.y2;break;case'n':pos[0]=f.x2;break;case's':pos[0]=f.x2;break;}}else{switch(mode){case'e':pos[1]=f.y+1;break;case'w':pos[1]=f.y+1;break;case'n':pos[0]=f.x+1;break;case's':pos[0]=f.x+1;break;}}
29
- Coords.setCurrent(pos);Selection.update();};}
30
- function createMover(pos)
31
- {var lloc=pos;KeyManager.watchKeys();return function(pos){Coords.moveOffset([pos[0]-lloc[0],pos[1]-lloc[1]]);lloc=pos;Selection.update();};}
32
- function oppLockCorner(ord)
33
- {switch(ord){case'n':return'sw';case's':return'nw';case'e':return'nw';case'w':return'ne';case'ne':return'sw';case'nw':return'se';case'se':return'nw';case'sw':return'ne';}}
34
- function createDragger(ord)
35
- {return function(e){if(options.disabled){return false;}
36
- if((ord==='move')&&!options.allowMove){return false;}
37
- btndown=true;startDragMode(ord,mouseAbs(e));e.stopPropagation();e.preventDefault();return false;};}
38
- function presize($obj,w,h)
39
- {var nw=$obj.width(),nh=$obj.height();if((nw>w)&&w>0){nw=w;nh=(w/$obj.width())*$obj.height();}
40
- if((nh>h)&&h>0){nh=h;nw=(h/$obj.height())*$obj.width();}
41
- xscale=$obj.width()/nw;yscale=$obj.height()/nh;$obj.width(nw).height(nh);}
42
- function unscale(c)
43
- {return{x:parseInt(c.x*xscale,10),y:parseInt(c.y*yscale,10),x2:parseInt(c.x2*xscale,10),y2:parseInt(c.y2*yscale,10),w:parseInt(c.w*xscale,10),h:parseInt(c.h*yscale,10)};}
44
- function doneSelect(pos)
45
- {var c=Coords.getFixed();if((c.w>options.minSelect[0])&&(c.h>options.minSelect[1])){Selection.enableHandles();Selection.done();}else{Selection.release();}
46
- Tracker.setCursor(options.allowSelect?'crosshair':'default');}
47
- function newSelection(e)
48
- {if(options.disabled){return false;}
49
- if(!options.allowSelect){return false;}
50
- btndown=true;docOffset=getPos($img);Selection.disableHandles();myCursor('crosshair');var pos=mouseAbs(e);Coords.setPressed(pos);Selection.update();Tracker.activateHandlers(selectDrag,doneSelect);KeyManager.watchKeys();e.stopPropagation();e.preventDefault();return false;}
51
- function selectDrag(pos)
52
- {Coords.setCurrent(pos);Selection.update();}
53
- function newTracker()
54
- {var trk=$('<div></div>').addClass(cssClass('tracker'));if($.browser.msie){trk.css({opacity:0,backgroundColor:'white'});}
55
- return trk;}
56
- if($.browser.msie&&($.browser.version.split('.')[0]==='6')){ie6mode=true;}
57
- if(typeof(obj)!=='object'){obj=$(obj)[0];}
58
- if(typeof(opt)!=='object'){opt={};}
59
- setOptions(opt);var img_css={border:'none',margin:0,padding:0,position:'absolute'};var $origimg=$(obj);var $img=$origimg.clone().removeAttr('id').css(img_css);$img.width($origimg.width());$img.height($origimg.height());$origimg.after($img).hide();presize($img,options.boxWidth,options.boxHeight);var boundx=$img.width(),boundy=$img.height(),$div=$('<div />').width(boundx).height(boundy).addClass(cssClass('holder')).css({position:'relative',backgroundColor:options.bgColor}).insertAfter($origimg).append($img);delete(options.bgColor);if(options.addClass){$div.addClass(options.addClass);}
60
- var $img2=$('<img />').attr('src',$img.attr('src')).css(img_css).width(boundx).height(boundy),$img_holder=$('<div />').width(pct(100)).height(pct(100)).css({zIndex:310,position:'absolute',overflow:'hidden'}).append($img2),$hdl_holder=$('<div />').width(pct(100)).height(pct(100)).css('zIndex',320),$sel=$('<div />').css({position:'absolute',zIndex:300}).insertBefore($img).append($img_holder,$hdl_holder);if(ie6mode){$sel.css({overflowY:'hidden'});}
61
- var bound=options.boundary;var $trk=newTracker().width(boundx+(bound*2)).height(boundy+(bound*2)).css({position:'absolute',top:px(-bound),left:px(-bound),zIndex:290}).mousedown(newSelection);var bgopacity=options.bgOpacity,xlimit,ylimit,xmin,ymin,xscale,yscale,enabled=true,btndown,animating,shift_down;docOffset=getPos($img);var Touch=(function(){function hasTouchSupport(){var support={},events=['touchstart','touchmove','touchend'],el=document.createElement('div'),i;try{for(i=0;i<events.length;i++){var eventName=events[i];eventName='on'+eventName;var isSupported=(eventName in el);if(!isSupported){el.setAttribute(eventName,'return;');isSupported=typeof el[eventName]=='function';}
62
- support[events[i]]=isSupported;}
63
- return support.touchstart&&support.touchend&&support.touchmove;}
64
- catch(err){return false;}}
65
- function detectSupport(){if((options.touchSupport===true)||(options.touchSupport===false))return options.touchSupport;else return hasTouchSupport();}
66
- return{createDragger:function(ord){return function(e){e.pageX=e.originalEvent.changedTouches[0].pageX;e.pageY=e.originalEvent.changedTouches[0].pageY;if(options.disabled){return false;}
67
- if((ord==='move')&&!options.allowMove){return false;}
68
- btndown=true;startDragMode(ord,mouseAbs(e));e.stopPropagation();e.preventDefault();return false;};},newSelection:function(e){e.pageX=e.originalEvent.changedTouches[0].pageX;e.pageY=e.originalEvent.changedTouches[0].pageY;return newSelection(e);},isSupported:hasTouchSupport,support:detectSupport()};}());var Coords=(function(){var x1=0,y1=0,x2=0,y2=0,ox,oy;function setPressed(pos)
69
- {pos=rebound(pos);x2=x1=pos[0];y2=y1=pos[1];}
70
- function setCurrent(pos)
71
- {pos=rebound(pos);ox=pos[0]-x2;oy=pos[1]-y2;x2=pos[0];y2=pos[1];}
72
- function getOffset()
73
- {return[ox,oy];}
74
- function moveOffset(offset)
75
- {var ox=offset[0],oy=offset[1];if(0>x1+ox){ox-=ox+x1;}
76
- if(0>y1+oy){oy-=oy+y1;}
77
- if(boundy<y2+oy){oy+=boundy-(y2+oy);}
78
- if(boundx<x2+ox){ox+=boundx-(x2+ox);}
79
- x1+=ox;x2+=ox;y1+=oy;y2+=oy;}
80
- function getCorner(ord)
81
- {var c=getFixed();switch(ord){case'ne':return[c.x2,c.y];case'nw':return[c.x,c.y];case'se':return[c.x2,c.y2];case'sw':return[c.x,c.y2];}}
82
- function getFixed()
83
- {if(!options.aspectRatio){return getRect();}
84
- var aspect=options.aspectRatio,min_x=options.minSize[0]/xscale,max_x=options.maxSize[0]/xscale,max_y=options.maxSize[1]/yscale,rw=x2-x1,rh=y2-y1,rwa=Math.abs(rw),rha=Math.abs(rh),real_ratio=rwa/rha,xx,yy;if(max_x===0){max_x=boundx*10;}
85
- if(max_y===0){max_y=boundy*10;}
86
- if(real_ratio<aspect){yy=y2;w=rha*aspect;xx=rw<0?x1-w:w+x1;if(xx<0){xx=0;h=Math.abs((xx-x1)/aspect);yy=rh<0?y1-h:h+y1;}else if(xx>boundx){xx=boundx;h=Math.abs((xx-x1)/aspect);yy=rh<0?y1-h:h+y1;}}else{xx=x2;h=rwa/aspect;yy=rh<0?y1-h:y1+h;if(yy<0){yy=0;w=Math.abs((yy-y1)*aspect);xx=rw<0?x1-w:w+x1;}else if(yy>boundy){yy=boundy;w=Math.abs(yy-y1)*aspect;xx=rw<0?x1-w:w+x1;}}
87
- if(xx>x1){if(xx-x1<min_x){xx=x1+min_x;}else if(xx-x1>max_x){xx=x1+max_x;}
88
- if(yy>y1){yy=y1+(xx-x1)/aspect;}else{yy=y1-(xx-x1)/aspect;}}else if(xx<x1){if(x1-xx<min_x){xx=x1-min_x;}else if(x1-xx>max_x){xx=x1-max_x;}
89
- if(yy>y1){yy=y1+(x1-xx)/aspect;}else{yy=y1-(x1-xx)/aspect;}}
90
- if(xx<0){x1-=xx;xx=0;}else if(xx>boundx){x1-=xx-boundx;xx=boundx;}
91
- if(yy<0){y1-=yy;yy=0;}else if(yy>boundy){y1-=yy-boundy;yy=boundy;}
92
- return makeObj(flipCoords(x1,y1,xx,yy));}
93
- function rebound(p)
94
- {if(p[0]<0){p[0]=0;}
95
- if(p[1]<0){p[1]=0;}
96
- if(p[0]>boundx){p[0]=boundx;}
97
- if(p[1]>boundy){p[1]=boundy;}
98
- return[p[0],p[1]];}
99
- function flipCoords(x1,y1,x2,y2)
100
- {var xa=x1,xb=x2,ya=y1,yb=y2;if(x2<x1){xa=x2;xb=x1;}
101
- if(y2<y1){ya=y2;yb=y1;}
102
- return[Math.round(xa),Math.round(ya),Math.round(xb),Math.round(yb)];}
103
- function getRect()
104
- {var xsize=x2-x1,ysize=y2-y1,delta;if(xlimit&&(Math.abs(xsize)>xlimit)){x2=(xsize>0)?(x1+xlimit):(x1-xlimit);}
105
- if(ylimit&&(Math.abs(ysize)>ylimit)){y2=(ysize>0)?(y1+ylimit):(y1-ylimit);}
106
- if(ymin/yscale&&(Math.abs(ysize)<ymin/yscale)){y2=(ysize>0)?(y1+ymin/yscale):(y1-ymin/yscale);}
107
- if(xmin/xscale&&(Math.abs(xsize)<xmin/xscale)){x2=(xsize>0)?(x1+xmin/xscale):(x1-xmin/xscale);}
108
- if(x1<0){x2-=x1;x1-=x1;}
109
- if(y1<0){y2-=y1;y1-=y1;}
110
- if(x2<0){x1-=x2;x2-=x2;}
111
- if(y2<0){y1-=y2;y2-=y2;}
112
- if(x2>boundx){delta=x2-boundx;x1-=delta;x2-=delta;}
113
- if(y2>boundy){delta=y2-boundy;y1-=delta;y2-=delta;}
114
- if(x1>boundx){delta=x1-boundy;y2-=delta;y1-=delta;}
115
- if(y1>boundy){delta=y1-boundy;y2-=delta;y1-=delta;}
116
- return makeObj(flipCoords(x1,y1,x2,y2));}
117
- function makeObj(a)
118
- {return{x:a[0],y:a[1],x2:a[2],y2:a[3],w:a[2]-a[0],h:a[3]-a[1]};}
119
- return{flipCoords:flipCoords,setPressed:setPressed,setCurrent:setCurrent,getOffset:getOffset,moveOffset:moveOffset,getCorner:getCorner,getFixed:getFixed};}());var Tracker=(function(){var onMove=function(){},onDone=function(){},trackDoc=options.trackDocument;function toFront()
120
- {$trk.css({zIndex:450});if(trackDoc){$(document).bind('mousemove',trackMove).bind('mouseup',trackUp);}}
121
- function toBack()
122
- {$trk.css({zIndex:290});if(trackDoc){$(document).unbind('mousemove',trackMove).unbind('mouseup',trackUp);}}
123
- function trackMove(e)
124
- {onMove(mouseAbs(e));return false;}
125
- function trackUp(e)
126
- {e.preventDefault();e.stopPropagation();if(btndown){btndown=false;onDone(mouseAbs(e));if(Selection.isAwake()){options.onSelect.call(api,unscale(Coords.getFixed()));}
127
- toBack();onMove=function(){};onDone=function(){};}
128
- return false;}
129
- function activateHandlers(move,done)
130
- {btndown=true;onMove=move;onDone=done;toFront();return false;}
131
- function trackTouchMove(e)
132
- {e.pageX=e.originalEvent.changedTouches[0].pageX;e.pageY=e.originalEvent.changedTouches[0].pageY;return trackMove(e);}
133
- function trackTouchEnd(e)
134
- {e.pageX=e.originalEvent.changedTouches[0].pageX;e.pageY=e.originalEvent.changedTouches[0].pageY;return trackUp(e);}
135
- function setCursor(t)
136
- {$trk.css('cursor',t);}
137
- if(Touch.support){$trk.bind('touchmove',trackTouchMove).bind('touchend',trackTouchEnd);}
138
- if(!trackDoc){$trk.mousemove(trackMove).mouseup(trackUp).mouseout(trackUp);}
139
- $img.before($trk);return{trackTouchMove:trackTouchMove,activateHandlers:activateHandlers,setCursor:setCursor};}());var Selection=(function(){var awake,hdep=370;var borders={};var handle={};var seehandles=false;var hhs=options.handleOffset;function insertBorder(type)
140
- {var jq=$('<div />').css({position:'absolute',opacity:options.borderOpacity}).addClass(cssClass(type));$img_holder.append(jq);return jq;}
141
- function dragDiv(ord,zi)
142
- {var jq=$('<div />').mousedown(createDragger(ord)).css({cursor:ord+'-resize',position:'absolute',zIndex:zi});if(Touch.support){jq.bind('touchstart',Touch.createDragger(ord)).bind('touchmove',Tracker.trackTouchMove).bind('touchend',Tracker.trackTouchEnd);}
143
- $hdl_holder.append(jq);return jq;}
144
- function insertHandle(ord)
145
- {return dragDiv(ord,hdep++).css({top:px(-hhs+1),left:px(-hhs+1),opacity:options.handleOpacity}).addClass(cssClass('handle'));}
146
- function insertDragbar(ord)
147
- {var s=options.handleSize,h=s,w=s,t=hhs,l=hhs;switch(ord){case'n':case's':w=pct(100);break;case'e':case'w':h=pct(100);break;}
148
- return dragDiv(ord,hdep++).width(w).height(h).css({top:px(-t+1),left:px(-l+1)});}
149
- function createHandles(li)
150
- {var i;for(i=0;i<li.length;i++){handle[li[i]]=insertHandle(li[i]);}}
151
- function moveHandles(c)
152
- {var midvert=Math.round((c.h/2)-hhs),midhoriz=Math.round((c.w/2)-hhs),north=-hhs+1,west=-hhs+1,east=c.w-hhs,south=c.h-hhs,x,y;if(handle.e){handle.e.css({top:px(midvert),left:px(east)});handle.w.css({top:px(midvert)});handle.s.css({top:px(south),left:px(midhoriz)});handle.n.css({left:px(midhoriz)});}
153
- if(handle.ne){handle.ne.css({left:px(east)});handle.se.css({top:px(south),left:px(east)});handle.sw.css({top:px(south)});}
154
- if(handle.b){handle.b.css({top:px(south)});handle.r.css({left:px(east)});}}
155
- function moveto(x,y)
156
- {$img2.css({top:px(-y),left:px(-x)});$sel.css({top:px(y),left:px(x)});}
157
- function resize(w,h)
158
- {$sel.width(w).height(h);}
159
- function refresh()
160
- {var c=Coords.getFixed();Coords.setPressed([c.x,c.y]);Coords.setCurrent([c.x2,c.y2]);updateVisible();}
161
- function updateVisible()
162
- {if(awake){return update();}}
163
- function update()
164
- {var c=Coords.getFixed();resize(c.w,c.h);moveto(c.x,c.y);if(seehandles){moveHandles(c);}
165
- if(!awake){show();}
166
- options.onChange.call(api,unscale(c));}
167
- function show()
168
- {$sel.show();if(options.bgFade){$img.fadeTo(options.fadeTime,bgopacity);}else{$img.css('opacity',bgopacity);}
169
- awake=true;}
170
- function release()
171
- {disableHandles();$sel.hide();if(options.bgFade){$img.fadeTo(options.fadeTime,1);}else{$img.css('opacity',1);}
172
- awake=false;options.onRelease.call(api);}
173
- function showHandles()
174
- {if(seehandles){moveHandles(Coords.getFixed());$hdl_holder.show();}}
175
- function enableHandles()
176
- {seehandles=true;if(options.allowResize){moveHandles(Coords.getFixed());$hdl_holder.show();return true;}}
177
- function disableHandles()
178
- {seehandles=false;$hdl_holder.hide();}
179
- function animMode(v)
180
- {if(animating===v){disableHandles();}else{enableHandles();}}
181
- function done()
182
- {animMode(false);refresh();}
183
- if(options.drawBorders){borders={top:insertBorder('hline'),bottom:insertBorder('hline bottom'),left:insertBorder('vline'),right:insertBorder('vline right')};}
184
- if(options.dragEdges){handle.t=insertDragbar('n');handle.b=insertDragbar('s');handle.r=insertDragbar('e');handle.l=insertDragbar('w');}
185
- if(options.sideHandles){createHandles(['n','s','e','w']);}
186
- if(options.cornerHandles){createHandles(['sw','nw','ne','se']);}
187
- var $track=newTracker().mousedown(createDragger('move')).css({cursor:'move',position:'absolute',zIndex:360});if(Touch.support){$track.bind('touchstart.jcrop',Touch.createDragger('move')).bind('touchmove',Tracker.trackTouchMove).bind('touchend',Tracker.trackTouchEnd);}
188
- $img_holder.append($track);disableHandles();return{updateVisible:updateVisible,update:update,release:release,refresh:refresh,isAwake:function(){return awake;},setCursor:function(cursor){$track.css('cursor',cursor);},enableHandles:enableHandles,enableOnly:function(){seehandles=true;},showHandles:showHandles,disableHandles:disableHandles,animMode:animMode,done:done};}());var KeyManager=(function(){var $keymgr=$('<input type="radio" />').css({position:'fixed',left:'-120px',width:'12px'}),$keywrap=$('<div />').css({position:'absolute',overflow:'hidden'}).append($keymgr);function watchKeys()
189
- {if(options.keySupport){$keymgr.show();$keymgr.focus();}}
190
- function onBlur(e)
191
- {$keymgr.hide();}
192
- function doNudge(e,x,y)
193
- {if(options.allowMove){Coords.moveOffset([x,y]);Selection.updateVisible();}
194
- e.preventDefault();e.stopPropagation();}
195
- function parseKey(e)
196
- {if(e.ctrlKey){return true;}
197
- shift_down=e.shiftKey?true:false;var nudge=shift_down?10:1;switch(e.keyCode){case 37:doNudge(e,-nudge,0);break;case 39:doNudge(e,nudge,0);break;case 38:doNudge(e,0,-nudge);break;case 40:doNudge(e,0,nudge);break;case 27:Selection.release();break;case 9:return true;}
198
- return false;}
199
- if(options.keySupport){$keymgr.keydown(parseKey).blur(onBlur);if(ie6mode||!options.fixedSupport){$keymgr.css({position:'absolute',left:'-20px'});$keywrap.append($keymgr).insertBefore($img);}else{$keymgr.insertBefore($img);}}
200
- return{watchKeys:watchKeys};}());function setClass(cname)
201
- {$div.removeClass().addClass(cssClass('holder')).addClass(cname);}
202
- function animateTo(a,callback)
203
- {var x1=parseInt(a[0],10)/xscale,y1=parseInt(a[1],10)/yscale,x2=parseInt(a[2],10)/xscale,y2=parseInt(a[3],10)/yscale;if(animating){return;}
204
- var animto=Coords.flipCoords(x1,y1,x2,y2),c=Coords.getFixed(),initcr=[c.x,c.y,c.x2,c.y2],animat=initcr,interv=options.animationDelay,ix1=animto[0]-initcr[0],iy1=animto[1]-initcr[1],ix2=animto[2]-initcr[2],iy2=animto[3]-initcr[3],pcent=0,velocity=options.swingSpeed;x=animat[0];y=animat[1];x2=animat[2];y2=animat[3];Selection.animMode(true);var anim_timer;function queueAnimator(){window.setTimeout(animator,interv);}
205
- var animator=(function(){return function(){pcent+=(100-pcent)/velocity;animat[0]=x+((pcent/100)*ix1);animat[1]=y+((pcent/100)*iy1);animat[2]=x2+((pcent/100)*ix2);animat[3]=y2+((pcent/100)*iy2);if(pcent>=99.8){pcent=100;}
206
- if(pcent<100){setSelectRaw(animat);queueAnimator();}else{Selection.done();if(typeof(callback)==='function'){callback.call(api);}}};}());queueAnimator();}
207
- function setSelect(rect)
208
- {setSelectRaw([parseInt(rect[0],10)/xscale,parseInt(rect[1],10)/yscale,parseInt(rect[2],10)/xscale,parseInt(rect[3],10)/yscale]);}
209
- function setSelectRaw(l)
210
- {Coords.setPressed([l[0],l[1]]);Coords.setCurrent([l[2],l[3]]);Selection.update();}
211
- function tellSelect()
212
- {return unscale(Coords.getFixed());}
213
- function tellScaled()
214
- {return Coords.getFixed();}
215
- function setOptionsNew(opt)
216
- {setOptions(opt);interfaceUpdate();}
217
- function disableCrop()
218
- {options.disabled=true;Selection.disableHandles();Selection.setCursor('default');Tracker.setCursor('default');}
219
- function enableCrop()
220
- {options.disabled=false;interfaceUpdate();}
221
- function cancelCrop()
222
- {Selection.done();Tracker.activateHandlers(null,null);}
223
- function destroy()
224
- {$div.remove();$origimg.show();$(obj).removeData('Jcrop');}
225
- function setImage(src,callback)
226
- {Selection.release();disableCrop();var img=new Image();img.onload=function(){var iw=img.width;var ih=img.height;var bw=options.boxWidth;var bh=options.boxHeight;$img.width(iw).height(ih);$img.attr('src',src);$img2.attr('src',src);presize($img,bw,bh);boundx=$img.width();boundy=$img.height();$img2.width(boundx).height(boundy);$trk.width(boundx+(bound*2)).height(boundy+(bound*2));$div.width(boundx).height(boundy);enableCrop();if(typeof(callback)==='function'){callback.call(api);}};img.src=src;}
227
- function interfaceUpdate(alt)
228
- {if(options.allowResize){if(alt){Selection.enableOnly();}else{Selection.enableHandles();}}else{Selection.disableHandles();}
229
- Tracker.setCursor(options.allowSelect?'crosshair':'default');Selection.setCursor(options.allowMove?'move':'default');if(options.hasOwnProperty('setSelect')){setSelect(options.setSelect);Selection.done();delete(options.setSelect);}
230
- if(options.hasOwnProperty('trueSize')){xscale=options.trueSize[0]/boundx;yscale=options.trueSize[1]/boundy;}
231
- if(options.hasOwnProperty('bgColor')){if(supportsColorFade()&&options.fadeTime){$div.animate({backgroundColor:options.bgColor},{queue:false,duration:options.fadeTime});}else{$div.css('backgroundColor',options.bgColor);}
232
- delete(options.bgColor);}
233
- if(options.hasOwnProperty('bgOpacity')){bgopacity=options.bgOpacity;if(Selection.isAwake()){if(options.fadeTime){$img.fadeTo(options.fadeTime,bgopacity);}else{$div.css('opacity',options.opacity);}}
234
- delete(options.bgOpacity);}
235
- xlimit=options.maxSize[0]||0;ylimit=options.maxSize[1]||0;xmin=options.minSize[0]||0;ymin=options.minSize[1]||0;if(options.hasOwnProperty('outerImage')){$img.attr('src',options.outerImage);delete(options.outerImage);}
236
- Selection.refresh();}
237
- if(Touch.support){$trk.bind('touchstart',Touch.newSelection);}
238
- $hdl_holder.hide();interfaceUpdate(true);var api={setImage:setImage,animateTo:animateTo,setSelect:setSelect,setOptions:setOptionsNew,tellSelect:tellSelect,tellScaled:tellScaled,setClass:setClass,disable:disableCrop,enable:enableCrop,cancel:cancelCrop,release:Selection.release,destroy:destroy,focus:KeyManager.watchKeys,getBounds:function(){return[boundx*xscale,boundy*yscale];},getWidgetSize:function(){return[boundx,boundy];},getScaleFactor:function(){return[xscale,yscale];},ui:{holder:$div,selection:$sel}};if($.browser.msie){$div.bind('selectstart',function(){return false;});}
239
- $origimg.data('Jcrop',api);return api;};$.fn.Jcrop=function(options,callback)
240
- {function attachWhenDone(from)
241
- {var opt=(typeof(options)==='object')?options:{};var loadsrc=opt.useImg||from.src;var img=new Image();img.onload=function(){function attachJcrop(){var api=$.Jcrop(from,opt);if(typeof(callback)==='function'){callback.call(api);}}
242
- function attachAttempt(){if(!img.width||!img.height){window.setTimeout(attachAttempt,50);}else{attachJcrop();}}
243
- window.setTimeout(attachAttempt,50);};img.src=loadsrc;}
244
- this.each(function(){if($(this).data('Jcrop')){if(options==='api'){return $(this).data('Jcrop');}
245
- else{$(this).data('Jcrop').setOptions(options);}}
246
- else{attachWhenDone(this);}});return this;};$.Jcrop.defaults={allowSelect:true,allowMove:true,allowResize:true,trackDocument:true,baseClass:'jcrop',addClass:null,bgColor:'black',bgOpacity:0.6,bgFade:false,borderOpacity:0.4,handleOpacity:0.5,handleSize:9,handleOffset:5,aspectRatio:0,keySupport:true,cornerHandles:true,sideHandles:true,drawBorders:true,dragEdges:true,fixedSupport:true,touchSupport:null,boxWidth:0,boxHeight:0,boundary:2,fadeTime:400,animationDelay:20,swingSpeed:3,minSelect:[0,0],maxSize:[0,0],minSize:[0,0],onChange:function(){},onSelect:function(){},onRelease:function(){}};}(jQuery));
7
+ (function(a){a.Jcrop=function(b,c){function h(a){return a+"px"}function i(a){return d.baseClass+"-"+a}function j(){return a.fx.step.hasOwnProperty("backgroundColor")}function k(b){var c=a(b).offset();return[c.left,c.top]}function l(a){return[a.pageX-e[0],a.pageY-e[1]]}function m(b){typeof b!="object"&&(b={}),d=a.extend(d,b),a.each(["onChange","onSelect","onRelease","onDblClick"],function(a,b){typeof d[b]!="function"&&(d[b]=function(){})})}function n(a,b){e=k(E),bd.setCursor(a==="move"?a:a+"-resize");if(a==="move")return bd.activateHandlers(p(b),u);var c=ba.getFixed(),d=q(a),f=ba.getCorner(q(d));ba.setPressed(ba.getCorner(d)),ba.setCurrent(f),bd.activateHandlers(o(a,c),u)}function o(a,b){return function(c){if(!d.aspectRatio)switch(a){case"e":c[1]=b.y2;break;case"w":c[1]=b.y2;break;case"n":c[0]=b.x2;break;case"s":c[0]=b.x2}else switch(a){case"e":c[1]=b.y+1;break;case"w":c[1]=b.y+1;break;case"n":c[0]=b.x+1;break;case"s":c[0]=b.x+1}ba.setCurrent(c),bc.update()}}function p(a){var b=a;return be.watchKeys(),function(
8
+ a){ba.moveOffset([a[0]-b[0],a[1]-b[1]]),b=a,bc.update()}}function q(a){switch(a){case"n":return"sw";case"s":return"nw";case"e":return"nw";case"w":return"ne";case"ne":return"sw";case"nw":return"se";case"se":return"nw";case"sw":return"ne"}}function r(a){return function(b){return d.disabled?!1:a==="move"&&!d.allowMove?!1:(e=k(E),X=!0,n(a,l(b)),b.stopPropagation(),b.preventDefault(),!1)}}function s(a,b,c){var d=a.width(),e=a.height();d>b&&b>0&&(d=b,e=b/a.width()*a.height()),e>c&&c>0&&(e=c,d=c/a.height()*a.width()),U=a.width()/d,V=a.height()/e,a.width(d).height(e)}function t(a){return{x:a.x*U,y:a.y*V,x2:a.x2*U,y2:a.y2*V,w:a.w*U,h:a.h*V}}function u(a){var b=ba.getFixed();b.w>d.minSelect[0]&&b.h>d.minSelect[1]?(bc.enableHandles(),bc.done()):bc.release(),bd.setCursor(d.allowSelect?"crosshair":"default")}function v(a){if(d.disabled)return!1;if(!d.allowSelect)return!1;X=!0,e=k(E),bc.disableHandles(),bd.setCursor("crosshair");var b=l(a);return ba.setPressed(b),bc.update(),bd.activateHandlers(w,u),be.watchKeys(),a.stopPropagation
9
+ (),a.preventDefault(),!1}function w(a){ba.setCurrent(a),bc.update()}function z(){var b=a("<div></div>").addClass(i("tracker"));return a.browser.msie&&b.css({opacity:0,backgroundColor:"white"}),b}function bf(a){H.removeClass().addClass(i("holder")).addClass(a)}function bg(a,b){function t(){window.setTimeout(u,l)}var c=a[0]/U,e=a[1]/V,f=a[2]/U,g=a[3]/V;if(Y)return;var h=ba.flipCoords(c,e,f,g),i=ba.getFixed(),j=[i.x,i.y,i.x2,i.y2],k=j,l=d.animationDelay,m=h[0]-j[0],n=h[1]-j[1],o=h[2]-j[2],p=h[3]-j[3],q=0,r=d.swingSpeed;x=k[0],y=k[1],f=k[2],g=k[3],bc.animMode(!0);var s,u=function(){return function(){q+=(100-q)/r,k[0]=x+q/100*m,k[1]=y+q/100*n,k[2]=f+q/100*o,k[3]=g+q/100*p,q>=99.8&&(q=100),q<100?(bi(k),t()):(bc.done(),typeof b=="function"&&b.call(bt))}}();t()}function bh(a){bi([a[0]/U,a[1]/V,a[2]/U,a[3]/V]),d.onSelect.call(bt,t(ba.getFixed())),bc.enableHandles()}function bi(a){ba.setPressed([a[0],a[1]]),ba.setCurrent([a[2],a[3]]),bc.update()}function bj(){return t(ba.getFixed())}function bk(){return ba.getFixed()}function bl
10
+ (a){m(a),bs()}function bm(){d.disabled=!0,bc.disableHandles(),bc.setCursor("default"),bd.setCursor("default")}function bn(){d.disabled=!1,bs()}function bo(){bc.done(),bd.activateHandlers(null,null)}function bp(){H.remove(),B.show(),a(b).removeData("Jcrop")}function bq(a,b){bc.release(),bm();var c=new Image;c.onload=function(){var e=c.width,f=c.height,g=d.boxWidth,h=d.boxHeight;E.width(e).height(f),E.attr("src",a),I.attr("src",a),s(E,g,h),F=E.width(),G=E.height(),I.width(F).height(G),N.width(F+M*2).height(G+M*2),H.width(F).height(G),bb.resize(F,G),bn(),typeof b=="function"&&b.call(bt)},c.src=a}function br(a,b,c){var e=b||d.bgColor;d.bgFade&&j()&&d.fadeTime&&!c?a.animate({backgroundColor:e},{queue:!1,duration:d.fadeTime}):a.css("backgroundColor",e)}function bs(a){d.allowResize?a?bc.enableOnly():bc.enableHandles():bc.disableHandles(),bd.setCursor(d.allowSelect?"crosshair":"default"),bc.setCursor(d.allowMove?"move":"default"),d.hasOwnProperty("trueSize")&&(U=d.trueSize[0]/F,V=d.trueSize[1]/G),d.hasOwnProperty("setSelect"
11
+ )&&(bh(d.setSelect),bc.done(),delete d.setSelect),bb.refresh(),d.bgColor!=O&&(br(d.shade?bb.getShades():H,d.shade?d.shadeColor||d.bgColor:d.bgColor),O=d.bgColor),P!=d.bgOpacity&&(P=d.bgOpacity,d.shade?bb.refresh():bc.setBgOpacity(P)),Q=d.maxSize[0]||0,R=d.maxSize[1]||0,S=d.minSize[0]||0,T=d.minSize[1]||0,d.hasOwnProperty("outerImage")&&(E.attr("src",d.outerImage),delete d.outerImage),bc.refresh()}var d=a.extend({},a.Jcrop.defaults),e,f,g=!1;a.browser.msie&&a.browser.version.split(".")[0]==="6"&&(g=!0),typeof b!="object"&&(b=a(b)[0]),typeof c!="object"&&(c={}),m(c);var A={border:"none",visibility:"visible",margin:0,padding:0,position:"absolute",top:0,left:0},B=a(b),C=!0;if(b.tagName=="IMG"){if(B[0].width!=0&&B[0].height!=0)B.width(B[0].width),B.height(B[0].height);else{var D=new Image;D.src=B[0].src,B.width(D.width),B.height(D.height)}var E=B.clone().removeAttr("id").css(A).show();E.width(B.width()),E.height(B.height()),B.after(E).hide()}else E=B.css(A).show(),C=!1,d.shade===null&&(d.shade=!0);s(E,d.boxWidth,d.
12
+ boxHeight);var F=E.width(),G=E.height(),H=a("<div />").width(F).height(G).addClass(i("holder")).css({position:"relative",backgroundColor:d.bgColor}).insertAfter(B).append(E);d.addClass&&H.addClass(d.addClass);var I=a("<div />"),J=a("<div />").width("100%").height("100%").css({zIndex:310,position:"absolute",overflow:"hidden"}),K=a("<div />").width("100%").height("100%").css("zIndex",320),L=a("<div />").css({position:"absolute",zIndex:600}).dblclick(function(){var a=ba.getFixed();d.onDblClick.call(bt,a)}).insertBefore(E).append(J,K);C&&(I=a("<img />").attr("src",E.attr("src")).css(A).width(F).height(G),J.append(I)),g&&L.css({overflowY:"hidden"});var M=d.boundary,N=z().width(F+M*2).height(G+M*2).css({position:"absolute",top:h(-M),left:h(-M),zIndex:290}).mousedown(v),O=d.bgColor,P=d.bgOpacity,Q,R,S,T,U,V,W=!0,X,Y,Z;e=k(E);var _=function(){function a(){var a={},b=["touchstart","touchmove","touchend"],c=document.createElement("div"),d;try{for(d=0;d<b.length;d++){var e=b[d];e="on"+e;var f=e in c;f||(c.setAttribute(e,"return;"
13
+ ),f=typeof c[e]=="function"),a[b[d]]=f}return a.touchstart&&a.touchend&&a.touchmove}catch(g){return!1}}function b(){return d.touchSupport===!0||d.touchSupport===!1?d.touchSupport:a()}return{createDragger:function(a){return function(b){return b.pageX=b.originalEvent.changedTouches[0].pageX,b.pageY=b.originalEvent.changedTouches[0].pageY,d.disabled?!1:a==="move"&&!d.allowMove?!1:(X=!0,n(a,l(b)),b.stopPropagation(),b.preventDefault(),!1)}},newSelection:function(a){return a.pageX=a.originalEvent.changedTouches[0].pageX,a.pageY=a.originalEvent.changedTouches[0].pageY,v(a)},isSupported:a,support:b()}}(),ba=function(){function h(d){d=n(d),c=a=d[0],e=b=d[1]}function i(a){a=n(a),f=a[0]-c,g=a[1]-e,c=a[0],e=a[1]}function j(){return[f,g]}function k(d){var f=d[0],g=d[1];0>a+f&&(f-=f+a),0>b+g&&(g-=g+b),G<e+g&&(g+=G-(e+g)),F<c+f&&(f+=F-(c+f)),a+=f,c+=f,b+=g,e+=g}function l(a){var b=m();switch(a){case"ne":return[b.x2,b.y];case"nw":return[b.x,b.y];case"se":return[b.x2,b.y2];case"sw":return[b.x,b.y2]}}function m(){if(!d.aspectRatio
14
+ )return p();var f=d.aspectRatio,g=d.minSize[0]/U,h=d.maxSize[0]/U,i=d.maxSize[1]/V,j=c-a,k=e-b,l=Math.abs(j),m=Math.abs(k),n=l/m,r,s,t,u;return h===0&&(h=F*10),i===0&&(i=G*10),n<f?(s=e,t=m*f,r=j<0?a-t:t+a,r<0?(r=0,u=Math.abs((r-a)/f),s=k<0?b-u:u+b):r>F&&(r=F,u=Math.abs((r-a)/f),s=k<0?b-u:u+b)):(r=c,u=l/f,s=k<0?b-u:b+u,s<0?(s=0,t=Math.abs((s-b)*f),r=j<0?a-t:t+a):s>G&&(s=G,t=Math.abs(s-b)*f,r=j<0?a-t:t+a)),r>a?(r-a<g?r=a+g:r-a>h&&(r=a+h),s>b?s=b+(r-a)/f:s=b-(r-a)/f):r<a&&(a-r<g?r=a-g:a-r>h&&(r=a-h),s>b?s=b+(a-r)/f:s=b-(a-r)/f),r<0?(a-=r,r=0):r>F&&(a-=r-F,r=F),s<0?(b-=s,s=0):s>G&&(b-=s-G,s=G),q(o(a,b,r,s))}function n(a){return a[0]<0&&(a[0]=0),a[1]<0&&(a[1]=0),a[0]>F&&(a[0]=F),a[1]>G&&(a[1]=G),[a[0],a[1]]}function o(a,b,c,d){var e=a,f=c,g=b,h=d;return c<a&&(e=c,f=a),d<b&&(g=d,h=b),[e,g,f,h]}function p(){var d=c-a,f=e-b,g;return Q&&Math.abs(d)>Q&&(c=d>0?a+Q:a-Q),R&&Math.abs(f)>R&&(e=f>0?b+R:b-R),T/V&&Math.abs(f)<T/V&&(e=f>0?b+T/V:b-T/V),S/U&&Math.abs(d)<S/U&&(c=d>0?a+S/U:a-S/U),a<0&&(c-=a,a-=a),b<0&&(e-=b,b-=b),c<0&&
15
+ (a-=c,c-=c),e<0&&(b-=e,e-=e),c>F&&(g=c-F,a-=g,c-=g),e>G&&(g=e-G,b-=g,e-=g),a>F&&(g=a-G,e-=g,b-=g),b>G&&(g=b-G,e-=g,b-=g),q(o(a,b,c,e))}function q(a){return{x:a[0],y:a[1],x2:a[2],y2:a[3],w:a[2]-a[0],h:a[3]-a[1]}}var a=0,b=0,c=0,e=0,f,g;return{flipCoords:o,setPressed:h,setCurrent:i,getOffset:j,moveOffset:k,getCorner:l,getFixed:m}}(),bb=function(){function f(a,b){e.left.css({height:h(b)}),e.right.css({height:h(b)})}function g(){return i(ba.getFixed())}function i(a){e.top.css({left:h(a.x),width:h(a.w),height:h(a.y)}),e.bottom.css({top:h(a.y2),left:h(a.x),width:h(a.w),height:h(G-a.y2)}),e.right.css({left:h(a.x2),width:h(F-a.x2)}),e.left.css({width:h(a.x)})}function j(){return a("<div />").css({position:"absolute",backgroundColor:d.shadeColor||d.bgColor}).appendTo(c)}function k(){b||(b=!0,c.insertBefore(E),g(),bc.setBgOpacity(1,0,1),I.hide(),l(d.shadeColor||d.bgColor,1),bc.isAwake()?n(d.bgOpacity,1):n(1,1))}function l(a,b){br(p(),a,b)}function m(){b&&(c.remove(),I.show(),b=!1,bc.isAwake()?bc.setBgOpacity(d.bgOpacity
16
+ ,1,1):(bc.setBgOpacity(1,1,1),bc.disableHandles()),br(H,0,1))}function n(a,e){b&&(d.bgFade&&!e?c.animate({opacity:1-a},{queue:!1,duration:d.fadeTime}):c.css({opacity:1-a}))}function o(){d.shade?k():m(),bc.isAwake()&&n(d.bgOpacity)}function p(){return c.children()}var b=!1,c=a("<div />").css({position:"absolute",zIndex:240,opacity:0}),e={top:j(),left:j().height(G),right:j().height(G),bottom:j()};return{update:g,updateRaw:i,getShades:p,setBgColor:l,enable:k,disable:m,resize:f,refresh:o,opacity:n}}(),bc=function(){function k(b){var c=a("<div />").css({position:"absolute",opacity:d.borderOpacity}).addClass(i(b));return J.append(c),c}function l(b,c){var d=a("<div />").mousedown(r(b)).css({cursor:b+"-resize",position:"absolute",zIndex:c}).addClass("ord-"+b);return _.support&&d.bind("touchstart.jcrop",_.createDragger(b)),K.append(d),d}function m(a){var b=d.handleSize;return l(a,c++).css({opacity:d.handleOpacity}).width(b).height(b).addClass(i("handle"))}function n(a){return l(a,c++).addClass("jcrop-dragbar")}function o
17
+ (a){var b;for(b=0;b<a.length;b++)g[a[b]]=n(a[b])}function p(a){var b,c;for(c=0;c<a.length;c++){switch(a[c]){case"n":b="hline";break;case"s":b="hline bottom";break;case"e":b="vline right";break;case"w":b="vline"}e[a[c]]=k(b)}}function q(a){var b;for(b=0;b<a.length;b++)f[a[b]]=m(a[b])}function s(a,b){d.shade||I.css({top:h(-b),left:h(-a)}),L.css({top:h(b),left:h(a)})}function u(a,b){L.width(a).height(b)}function v(){var a=ba.getFixed();ba.setPressed([a.x,a.y]),ba.setCurrent([a.x2,a.y2]),w()}function w(a){if(b)return x(a)}function x(a){var c=ba.getFixed();u(c.w,c.h),s(c.x,c.y),d.shade&&bb.updateRaw(c),b||A(),a?d.onSelect.call(bt,t(c)):d.onChange.call(bt,t(c))}function y(a,c,e){if(!b&&!c)return;d.bgFade&&!e?E.animate({opacity:a},{queue:!1,duration:d.fadeTime}):E.css("opacity",a)}function A(){L.show(),d.shade?bb.opacity(P):y(P,!0),b=!0}function B(){F(),L.hide(),d.shade?bb.opacity(1):y(1),b=!1,d.onRelease.call(bt)}function C(){j&&K.show()}function D(){j=!0;if(d.allowResize)return K.show(),!0}function F(){j=!1,K.hide(
18
+ )}function G(a){Y===a?F():D()}function H(){G(!1),v()}var b,c=370,e={},f={},g={},j=!1;d.dragEdges&&a.isArray(d.createDragbars)&&o(d.createDragbars),a.isArray(d.createHandles)&&q(d.createHandles),d.drawBorders&&a.isArray(d.createBorders)&&p(d.createBorders),a(document).bind("touchstart.jcrop-ios",function(b){a(b.currentTarget).hasClass("jcrop-tracker")&&b.stopPropagation()});var M=z().mousedown(r("move")).css({cursor:"move",position:"absolute",zIndex:360});return _.support&&M.bind("touchstart.jcrop",_.createDragger("move")),J.append(M),F(),{updateVisible:w,update:x,release:B,refresh:v,isAwake:function(){return b},setCursor:function(a){M.css("cursor",a)},enableHandles:D,enableOnly:function(){j=!0},showHandles:C,disableHandles:F,animMode:G,setBgOpacity:y,done:H}}(),bd=function(){function f(){N.css({zIndex:450}),_.support&&a(document).bind("touchmove.jcrop",k).bind("touchend.jcrop",m),e&&a(document).bind("mousemove.jcrop",h).bind("mouseup.jcrop",i)}function g(){N.css({zIndex:290}),a(document).unbind(".jcrop")}function h
19
+ (a){return b(l(a)),!1}function i(a){return a.preventDefault(),a.stopPropagation(),X&&(X=!1,c(l(a)),bc.isAwake()&&d.onSelect.call(bt,t(ba.getFixed())),g(),b=function(){},c=function(){}),!1}function j(a,d){return X=!0,b=a,c=d,f(),!1}function k(a){return a.pageX=a.originalEvent.changedTouches[0].pageX,a.pageY=a.originalEvent.changedTouches[0].pageY,h(a)}function m(a){return a.pageX=a.originalEvent.changedTouches[0].pageX,a.pageY=a.originalEvent.changedTouches[0].pageY,i(a)}function n(a){N.css("cursor",a)}var b=function(){},c=function(){},e=d.trackDocument;return e||N.mousemove(h).mouseup(i).mouseout(i),E.before(N),{activateHandlers:j,setCursor:n}}(),be=function(){function e(){d.keySupport&&(b.show(),b.focus())}function f(a){b.hide()}function h(a,b,c){d.allowMove&&(ba.moveOffset([b,c]),bc.updateVisible(!0)),a.preventDefault(),a.stopPropagation()}function i(a){if(a.ctrlKey||a.metaKey)return!0;Z=a.shiftKey?!0:!1;var b=Z?10:1;switch(a.keyCode){case 37:h(a,-b,0);break;case 39:h(a,b,0);break;case 38:h(a,0,-b);break;case 40
20
+ :h(a,0,b);break;case 27:d.allowSelect&&bc.release();break;case 9:return!0}return!1}var b=a('<input type="radio" />').css({position:"fixed",left:"-120px",width:"12px"}),c=a("<div />").css({position:"absolute",overflow:"hidden"}).append(b);return d.keySupport&&(b.keydown(i).blur(f),g||!d.fixedSupport?(b.css({position:"absolute",left:"-20px"}),c.append(b).insertBefore(E)):b.insertBefore(E)),{watchKeys:e}}();_.support&&N.bind("touchstart.jcrop",_.newSelection),K.hide(),bs(!0);var bt={setImage:bq,animateTo:bg,setSelect:bh,setOptions:bl,tellSelect:bj,tellScaled:bk,setClass:bf,disable:bm,enable:bn,cancel:bo,release:bc.release,destroy:bp,focus:be.watchKeys,getBounds:function(){return[F*U,G*V]},getWidgetSize:function(){return[F,G]},getScaleFactor:function(){return[U,V]},getOptions:function(){return d},ui:{holder:H,selection:L}};return a.browser.msie&&H.bind("selectstart",function(){return!1}),B.data("Jcrop",bt),bt},a.fn.Jcrop=function(b,c){var d;return this.each(function(){if(a(this).data("Jcrop")){if(b==="api")return a
21
+ (this).data("Jcrop");a(this).data("Jcrop").setOptions(b)}else this.tagName=="IMG"?a.Jcrop.Loader(this,function(){a(this).css({display:"block",visibility:"hidden"}),d=a.Jcrop(this,b),a.isFunction(c)&&c.call(d)}):(a(this).css({display:"block",visibility:"hidden"}),d=a.Jcrop(this,b),a.isFunction(c)&&c.call(d))}),this},a.Jcrop.Loader=function(b,c,d){function g(){f.complete?(e.unbind(".jcloader"),a.isFunction(c)&&c.call(f)):window.setTimeout(g,50)}var e=a(b),f=e[0];e.bind("load.jcloader",g).bind("error.jcloader",function(b){e.unbind(".jcloader"),a.isFunction(d)&&d.call(f)}),f.complete&&a.isFunction(c)&&(e.unbind(".jcloader"),c.call(f))},a.Jcrop.defaults={allowSelect:!0,allowMove:!0,allowResize:!0,trackDocument:!0,baseClass:"jcrop",addClass:null,bgColor:"black",bgOpacity:.6,bgFade:!1,borderOpacity:.4,handleOpacity:.5,handleSize:7,aspectRatio:0,keySupport:!0,createHandles:["n","s","e","w","nw","ne","se","sw"],createDragbars:["n","s","e","w"],createBorders:["n","s","e","w"],drawBorders:!0,dragEdges:!0,fixedSupport:!0,
22
+ touchSupport:null,shade:null,boxWidth:0,boxHeight:0,boundary:2,fadeTime:400,animationDelay:20,swingSpeed:3,minSelect:[0,0],maxSize:[0,0],minSize:[0,0],onChange:function(){},onSelect:function(){},onDblClick:function(){},onRelease:function(){}}})(jQuery);
@@ -0,0 +1 @@
1
+ (function(e){"use strict";e(window.jQuery,window,document)})(function(e,t,n,r){"use strict";e.widget("selectBox.selectBoxIt",{VERSION:"1.8.0",options:{showEffect:"none",showEffectOptions:{},showEffectSpeed:"medium",hideEffect:"none",hideEffectOptions:{},hideEffectSpeed:"medium",showFirstOption:!0,defaultText:"",defaultIcon:"",downArrowIcon:"",theme:"twitterbootstrap",keydownOpen:!0,isMobile:function(){var e=navigator.userAgent||navigator.vendor||t.opera;return/android.+mobile|avantgo|bada\/|blackberry|ipad|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(e)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|e\-|e\/|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(di|rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|xda(\-|2|g)|yas\-|your|zeto|zte\-/i.test(e.substr(0,4))}},_create:function(){var t=this;return t.originalElem=t.element[0],t.selectBox=t.element,t.selectItems=t.element.find("option"),t.firstSelectItem=t.element.find("option").slice(0,1),t.currentFocus=0,t.blur=!0,t.documentHeight=e(n).height(),t.textArray=[],t.currentIndex=0,t.flipped=!1,t._createDiv()._createUnorderedList()._replaceSelectBox()._eventHandlers(),t.originalElem.disabled&&t.disable&&t.disable(),t._ariaAccessibility&&t._ariaAccessibility(),t._mobile&&t._mobile(),t.options.theme==="twitterbootstrap"?t._twitterbootstrap():this.options.theme==="jqueryui"?t._jqueryui():t._addClasses(),t.selectBox.trigger("create"),t},_createDiv:function(){var t=this;return t.divText=e("<span/>",{id:(t.originalElem.id||"")&&t.originalElem.id+"SelectBoxItText","class":"selectboxit-text",unselectable:"on",text:t.firstSelectItem.text()}).attr("data-val",t.originalElem.value),t.divImage=e("<i/>",{id:(t.originalElem.id||"")&&t.originalElem.id+"SelectBoxItDefaultIcon","class":"selectboxit-default-icon",unselectable:"on"}),t.div=e("<div/>",{id:(t.originalElem.id||"")&&t.originalElem.id+"SelectBoxIt","class":"selectboxit "+(t.selectBox.attr("class")||""),style:t.selectBox.attr("style"),name:t.originalElem.name,tabindex:t.selectBox.attr("tabindex")||"0",unselectable:"on"}).append(t.divImage).append(t.divText),t.divContainer=e("<div/>",{id:(t.originalElem.id||"")&&t.originalElem.id+"SelectBoxItContainer","class":"selectboxit-container"}).append(t.div),t},_createUnorderedList:function(){var t=this,n,r="",i="",s,o=[],u=e("<ul/>",{id:(t.originalElem.id||"")&&t.originalElem.id+"SelectBoxItOptions","class":"selectboxit-options",tabindex:-1});return t.options.showFirstOption||(t.selectItems=t.selectBox.find("option").slice(1)),t.selectItems.each(function(u){n=e(this).prop("disabled"),s=e(this).data("icon")||"",e(this).parent().is("optgroup")?(r="selectboxit-optgroup-option",e(this).index()===0?i='<div class="selectboxit-optgroup-header" data-disabled="true">'+e(this).parent().first().attr("label")+"</div>":i=""):r="",o.push(i+'<li id="'+u+'" data-val="'+this.value.replace(/\"/g,"&quot;")+'" data-disabled="'+n+'" class="'+r+" selectboxit-option"+(e(this).attr("class")||"")+'" style="'+(e(this).attr("style")||"")+'"><a><i class="'+s+'"></i>'+e(this).text()+"</a></li>"),t.textArray[u]=e(this).text(),this.selected&&(t.divText.text(e(this).text()),t.currentFocus=u)}),t.options.defaultText&&t.divText.text(t.options.defaultText),t.selectBox.data("text")&&(t.divText.text(t.selectBox.data("text")),t.options.defaultText=t.selectBox.data("text")),u.append(o.join("")),t.list=u,t.divContainer.append(t.list),t.listItems=t.list.find("li"),t.list.find("li[data-disabled='true']").not(".optgroupHeader").addClass("ui-state-disabled"),t.currentFocus===0&&!t.options.showFirstOption&&t.listItems.eq(0).hasClass("ui-state-disabled")&&(t.currentFocus=+t.listItems.not(".ui-state-disabled").first().attr("id")),t.divImage.addClass(t.selectBox.data("icon")||t.options.defaultIcon||t.listItems.eq(t.currentFocus).find("i").attr("class")),t},_replaceSelectBox:function(){var t=this;t.selectBox.css("display","none").after(t.divContainer);var n=t.div.height();return t.downArrow=e("<i/>",{id:(t.originalElem.id||"")&&t.originalElem.id+"SelectBoxItArrow","class":"selectboxit-arrow",unselectable:"on"}),t.downArrowContainer=e("<span/>",{id:(t.originalElem.id||"")&&t.originalElem.id+"SelectBoxItArrowContainer","class":"selectboxit-arrow-container",unselectable:"on",style:"height:"+n+"px;"}).append(t.downArrow),t.div.append(t.downArrowContainer),t.divText.css({"line-height":t.div.css("height"),"max-width":t.div.width()-(t.downArrowContainer.width()+t.divImage.width())}),t.divImage.css({"margin-top":n/4}),t},_scrollToView:function(e){var t=this,n=t.list.scrollTop(),r=t.listItems.eq(t.currentFocus).height(),i=t.listItems.eq(t.currentFocus).position().top,s=t.list.height();return e==="search"?s-i<r?t.list.scrollTop(n+(i-(s-r))):i<-1&&t.list.scrollTop(i-r):e==="up"?i<-1&&t.list.scrollTop(n-Math.abs(t.listItems.eq(t.currentFocus).position().top)):e==="down"&&s-i<r&&t.list.scrollTop(n+(Math.abs(t.listItems.eq(t.currentFocus).position().top)-s+r)),t},_callbackSupport:function(t){var n=this;return e.isFunction(t)&&t.call(n,n.div),n},open:function(e){var t=this;if(!this.list.is(":visible")){t.selectBox.trigger("open"),t._dynamicPositioning&&t._dynamicPositioning();switch(t.options.showEffect){case"none":t.list.show(),t._scrollToView("search");break;case"show":t.list.show(t.options.showEffectSpeed,function(){t._scrollToView("search")});break;case"slideDown":t.list.slideDown(t.options.showEffectSpeed,function(){t._scrollToView("search")});break;case"fadeIn":t.list.fadeIn(t.options.showEffectSpeed),t._scrollToView("search");break;default:t.list.show(t.options.showEffect,t.options.showEffectOptions,t.options.showEffectSpeed,function(){t._scrollToView("search")})}}return t._callbackSupport(e),t},close:function(e){var t=this;if(t.list.is(":visible")){t.selectBox.trigger("close");switch(t.options.hideEffect){case"none":t.list.hide(),t._scrollToView("search");break;case"hide":t.list.hide(t.options.hideEffectSpeed);break;case"slideUp":t.list.slideUp(t.options.hideEffectSpeed);break;case"fadeOut":t.list.fadeOut(t.options.hideEffectSpeed);break;default:t.list.hide(t.options.hideEffect,t.options.hideEffectOptions,t.options.hideEffectSpeed,function(){t._scrollToView("search")})}}return t._callbackSupport(e),t},_eventHandlers:function(){var t=this,n=38,r=40,i=13,s=8,o=9,u=32,a=27;return this.div.bind({"click.selectBoxIt":function(){t.div.focus(),t.originalElem.disabled||(t.selectBox.trigger("click"),t.list.is(":visible")?t.close():t.open())},"mousedown.selectBoxIt":function(){e(this).data("mdown",!0)},"blur.selectBoxIt":function(){t.blur&&(t.selectBox.trigger("blur").trigger("focusout"),t.list.is(":visible")&&t.close())},"focus.selectBoxIt":function(){var n=e(this).data("mdown");e(this).removeData("mdown"),n||t.selectBox.trigger("tab-focus"),t.list.is(":visible")||t.selectBox.trigger("focus").trigger("focusin")},"keydown.selectBoxIt":function(e){var u=e.keyCode;switch(u){case r:e.preventDefault(),t.moveDown&&(t.options.keydownOpen?t.list.is(":visible")?t.moveDown():t.open():t.moveDown()),t.options.keydownOpen&&t.open();break;case n:e.preventDefault(),t.moveUp&&(t.options.keydownOpen?t.list.is(":visible")?t.moveUp():t.open():t.moveUp()),t.options.keydownOpen&&t.open();break;case i:e.preventDefault(),t.list.is(":visible")&&t.close(),(!t.options.showFirstOption&&t.div.text()===t.firstSelectItem.text()&&t.currentFocus===0||t.options.showFirstOption&&t.options.defaultText||!t.options.showFirstOption&&!t.listItems.eq(0).not("[data-disabled='true']"))&&t.selectBox.val(t.listItems.eq(t.currentFocus).attr("data-val")).trigger("change",!0),t.selectBox.trigger("enter");break;case o:t.selectBox.trigger("tab-blur");break;case s:e.preventDefault(),t.selectBox.trigger("backspace");break;case a:t.close();break;default:}},"keypress.selectBoxIt":function(e){var n=e.charCode||e.keyCode,r=String.fromCharCode(n);n===u&&e.preventDefault(),t.search&&t.search(r,!0,"")},"mouseenter.selectBoxIt":function(){t.selectBox.trigger("mouseenter")},"mouseleave.selectBoxIt":function(){t.selectBox.trigger("mouseleave")}}),t.list.bind({"mouseover.selectBoxIt":function(){t.blur=!1},"mouseout.selectBoxIt":function(){t.blur=!0},"focusin.selectBoxIt":function(){t.div.focus()}}).delegate("li","click.selectBoxIt",function(){e(this).data("disabled")||(t.originalElem.value=e(this).attr("data-val"),t.currentFocus=+this.id,t.close(),t.originalElem.value!==t.divText.attr("data-val")&&t.selectBox.trigger("change",!0),t.selectBox.trigger("option-click"))}).delegate("li","focus.selectBoxIt",function(){e(this).data("disabled")||(t.originalElem.value=e(this).attr("data-val"),t.originalElem.value!==t.divText.attr("data-val")&&t.selectBox.trigger("change",!0))}),t.selectBox.bind({"change.selectBoxIt":function(e,n){if(n)t.divText.text(t.listItems.eq(t.currentFocus).text()).attr("data-val",t.originalElem.value);else{var r=t.list.find('li[data-val="'+t.originalElem.value+'"]');r.length&&(t.listItems.eq(t.currentFocus).removeClass(t.focusClass),t.currentFocus=r.attr("id"),t.divText.text(t.listItems.eq(t.currentFocus).text()).attr("data-val",t.originalElem.value))}t.listItems.eq(t.currentFocus).find("i").attr("class")&&t.divImage.attr("class",t.listItems.eq(t.currentFocus).find("i").attr("class")).addClass("selectboxit-default-icon"),t.selectBox.trigger("changed")},"disable.selectBoxIt":function(){t.div.addClass("ui-state-disabled")},"enable.selectBoxIt":function(){t.div.removeClass("ui-state-disabled")}}),t},_addClasses:function(t,n,r,i,s){var o=this,u=t||"selectboxit-focus",a=n||"selectboxit-hover",f=i||"selectboxit-btn",l=s||"selectboxit-dropdown";return o.focusClass=u,o.downArrow.addClass(o.selectBox.data("downarrow")||o.options.downArrowIcon||r),o.div.addClass(i),o.list.addClass(s),o.listItems.bind({"focus.selectBoxIt":function(){e(this).addClass(u)},"blur.selectBoxIt":function(){e(this).removeClass(u)}}),o.selectBox.bind({"open.selectBoxIt":function(){o.div.removeClass(a).add(o.listItems.eq(o.currentFocus)).addClass(u)},"blur.selectBoxIt":function(){o.div.removeClass(u)},"mouseenter.selectBoxIt":function(){o.div.addClass(a)},"mouseleave.selectBoxIt":function(){o.div.removeClass(a)}}),o.listItems.bind({"mouseenter.selectBoxIt":function(){o.listItems.removeClass(u),e(this).addClass(a)},"mouseleave.selectBoxIt":function(){e(this).removeClass(a)}}),o.options.theme==="twitterbootstrap"&&r==="caret"?o.downArrow.css({"margin-top":o.downArrowContainer.height()/2}):o.downArrow.css({"margin-top":o.downArrowContainer.height()/4}),o},_jqueryui:function(){var e=this;return e._addClasses("ui-state-focus","ui-state-hover","ui-icon ui-icon-triangle-1-s","ui-widget ui-state-default","ui-widget ui-widget-content"),e},_twitterbootstrap:function(){var e=this;return e._addClasses("active","","caret","btn","dropdown-menu"),e},destroy:function(t){var n=this;return n._destroySelectBoxIt(),e.Widget.prototype.destroy.call(n),n._callbackSupport(t),n},_destroySelectBoxIt:function(){var e=this;return e.div.unbind(".selectBoxIt").undelegate(".selectBoxIt"),e.divContainer.remove(),e.selectBox.trigger("destroy").show(),e},refresh:function(e){var t=this;return t._destroySelectBoxIt()._create()._callbackSupport(e),t}})});$(function(){$.selectBox.selectBoxIt.prototype._ariaAccessibility=function(){var e=this;return e.div.attr({role:"combobox","aria-autocomplete":"list","aria-expanded":"false","aria-owns":e.list.attr("id"),"aria-activedescendant":e.listItems.eq(e.currentFocus).attr("id"),"aria-label":$("label[for='"+e.originalElem.id+"']").text()||"","aria-live":"assertive"}).bind({"disable.selectBoxIt":function(){e.div.attr("aria-disabled","true")},"enable.selectBoxIt":function(){e.div.attr("aria-disabled","false")}}),e.list.attr({role:"listbox","aria-hidden":"true"}),e.listItems.attr({role:"option"}),e.selectBox.bind({"change.selectBoxIt":function(){e.divText.attr("aria-label",e.originalElem.value)},"open.selectBoxIt":function(){e.list.attr("aria-hidden","false"),e.div.attr("aria-expanded","true")},"close.selectBoxIt":function(){e.list.attr("aria-hidden","true"),e.div.attr("aria-expanded","false")}}),e}});$(function(){$.selectBox.selectBoxIt.prototype.disable=function(e){var t=this;if(!t.options.disabled)return t.close(),t.selectBox.trigger("disable").attr("disabled","disabled"),t.div.removeAttr("tabindex").css("cursor","default"),$.Widget.prototype.disable.call(t),t._callbackSupport(e),t},$.selectBox.selectBoxIt.prototype._isDisabled=function(e){var t=this;return t.originalElem.disabled&&t.disable(),t}});$(function(){$.selectBox.selectBoxIt.prototype._dynamicPositioning=function(){var e=this,t=e.div.offset().top,n=e.list.height(),r=e.div.height();return t+r+n>=$(window).height()+$(window).scrollTop()&&t-n>=0?e.flipped||(e.list.css("top",e.divContainer.position().top-e.list.height()-2),e.flipped=!0):e.flipped&&(e.list.css("top",e.divContainer.position().top+e.div.height()+2),e.flipped=!1),e}});$(function(){$.selectBox.selectBoxIt.prototype.enable=function(e){var t=this;return t.options.disabled&&(t.selectBox.trigger("enable").removeAttr("disabled"),t.div.attr("tabindex",0).css("cursor","pointer"),$.Widget.prototype.enable.call(t),t._callbackSupport(e)),t}});$(function(){$.selectBox.selectBoxIt.prototype.moveDown=function(e){var t=this;t.currentFocus+=1;var n=t.listItems.eq(t.currentFocus).data("disabled"),r=t.listItems.eq(t.currentFocus).nextAll("li").not("[data-disabled='true']").first().length;if(t.currentFocus===t.listItems.length)t.currentFocus-=1;else{if(n&&r){t.listItems.eq(t.currentFocus-1).blur(),t.moveDown();return}n&&!r?t.currentFocus-=1:(t.listItems.eq(t.currentFocus-1).blur().end().eq(t.currentFocus).focus(),t._scrollToView("down"),t.selectBox.trigger("moveDown"))}return t._callbackSupport(e),t},$.selectBox.selectBoxIt.prototype.moveUp=function(e){var t=this;t.currentFocus-=1;var n=t.listItems.eq(t.currentFocus).data("disabled"),r=t.listItems.eq(t.currentFocus).prevAll("li").not("[data-disabled='true']").first().length;if(t.currentFocus===-1)t.currentFocus+=1;else{if(n&&r){t.listItems.eq(t.currentFocus+1).blur(),t.moveUp();return}n&&!r?t.currentFocus+=1:(t.listItems.eq(this.currentFocus+1).blur().end().eq(t.currentFocus).focus(),t._scrollToView("up"),t.selectBox.trigger("moveUp"))}return t._callbackSupport(e),t}});$(function(){$.selectBox.selectBoxIt.prototype._setCurrentSearchOption=function(e){var t=this;return(e!==0||!!t.options.showFirstOption)&&t.listItems.eq(e).data("disabled")!==!0&&(t.divText.text(t.textArray[e]),t.listItems.eq(t.currentFocus).blur(),t.currentIndex=e,t.currentFocus=e,t.listItems.eq(t.currentFocus).focus(),t._scrollToView("search"),t.selectBox.trigger("search")),t},$.selectBox.selectBoxIt.prototype._searchAlgorithm=function(e,t){var n=this,r=!1,i,s,o;for(i=e,o=n.textArray.length;i<o;i+=1){for(s=0;s<o;s+=1)n.textArray[s].search(t)!==-1&&(r=!0,s=o);r||(n.currentText=n.currentText.charAt(n.currentText.length-1).replace(/[|()\[{.+*?$\\]/g,"\\$0"),t=new RegExp(n.currentText,"gi"));if(n.currentText.length<3){t=new RegExp(n.currentText.charAt(0),"gi");if(n.textArray[i].charAt(0).search(t)!==-1)return n._setCurrentSearchOption(i),n.currentIndex+=1,!1}else if(n.textArray[i].search(t)!==-1)return n._setCurrentSearchOption(i),!1;if(n.textArray[i].toLowerCase()===n.currentText.toLowerCase())return n._setCurrentSearchOption(i),n.currentText="",!1}return!0},$.selectBox.selectBoxIt.prototype.search=function(e,t,n){var r=this;t?r.currentText+=e.replace(/[|()\[{.+*?$\\]/g,"\\$0"):r.currentText=e.replace(/[|()\[{.+*?$\\]/g,"\\$0");var i=new RegExp(r.currentText,"gi"),s=r._searchAlgorithm(r.currentIndex,i);return s&&r._searchAlgorithm(0,i),r._callbackSupport(n),r}});$(function(){$.selectBox.selectBoxIt.prototype.setOption=function(e,t,n){var r=this;return e==="showFirstOption"&&!t?r.listItems.eq(0).hide():e==="showFirstOption"&&t?r.listItems.eq(0).show():e==="defaultIcon"&&t?r.divImage.attr("class",t):e==="downArrowIcon"&&t?r.downArrow.attr("class",t):e==="defaultText"&&r.divText.text(t),$.Widget.prototype._setOption.apply(r,arguments),r._callbackSupport(n),r}});$(function(){$.selectBox.selectBoxIt.prototype.setOptions=function(e,t){var n=this;return $.Widget.prototype._setOptions.apply(n,arguments),n.options.showFirstOption?n.listItems.eq(0).show():n.listItems.eq(0).hide(),n.options.defaultIcon&&n.divImage.attr("class",n.options.defaultIcon),n.options.downArrowIcon&&n.downArrow.attr("class",n.options.downArrowIcon),n.options.defaultText&&n.divText.text(n.options.defaultText),n._callbackSupport(t),n}});$(function(){$.selectBox.selectBoxIt.prototype.wait=function(e,t){var n=this,r=this.returnTimeout(e);return r.then(function(){n._callbackSupport(t)}),n},$.selectBox.selectBoxIt.prototype.returnTimeout=function(e){return $.Deferred(function(t){setTimeout(t.resolve,e)})}});$(function(){$.selectBox.selectBoxIt.prototype._mobile=function(e){var t=this,n;return t.options.isMobile()&&t.selectBox.css({display:"block",width:t.div.width(),opacity:"0",position:"absolute"}).bind({changed:function(){n=t.selectBox.find("option").filter(":selected"),t.divText.text(n.text()),t.list.find('li[data-val="'+n.val()+'"]').find("i").attr("class")&&t.divImage.attr("class",t.list.find('li[data-val="'+n.val()+'"]').find("i").attr("class")).addClass("selectboxit-default-icon")}}),t}});
@@ -53,14 +53,14 @@
53
53
  var maxDiff = 0; // the max difference between a selected and unselected tab
54
54
  self.lis.each(function (i) {
55
55
  if (i == self.options.selected) {
56
- selectedTabWidths[i] = $(this).outerWidth({ margin:true });
57
- tabWidths[i] = self.lis.eq(i).removeClass('ui-tabs-selected').outerWidth({ margin:true });
56
+ selectedTabWidths[i] = $(this).outerWidth(true);
57
+ tabWidths[i] = self.lis.eq(i).removeClass('ui-tabs-selected').outerWidth(true);
58
58
  self.lis.eq(i).addClass('ui-tabs-selected');
59
59
  maxDiff = Math.min(maxDiff, Math.abs(selectedTabWidths[i] - tabWidths[i]));
60
60
  allTabsWidth += tabWidths[i];
61
61
  } else {
62
- tabWidths[i] = $(this).outerWidth({ margin:true });
63
- selectedTabWidths[i] = self.lis.eq(i).addClass('ui-tabs-selected').outerWidth({ margin:true });
62
+ tabWidths[i] = $(this).outerWidth(true);
63
+ selectedTabWidths[i] = self.lis.eq(i).addClass('ui-tabs-selected').outerWidth(true);
64
64
  self.lis.eq(i).removeClass('ui-tabs-selected');
65
65
  maxDiff = Math.max(maxDiff, Math.abs(selectedTabWidths[i] - tabWidths[i]));
66
66
  allTabsWidth += tabWidths[i];
@@ -83,7 +83,7 @@
83
83
  .html(opts.nextButton));
84
84
 
85
85
  self.lis.eq(self.length() - 1).after(li);
86
- buttonWidth = li.outerWidth({ margin:true });
86
+ buttonWidth = li.outerWidth(true);
87
87
 
88
88
  // create prev button
89
89
  li = $('<li></li>')
@@ -95,7 +95,7 @@
95
95
  })
96
96
  .html(opts.prevButton));
97
97
  self.lis.eq(0).before(li);
98
- buttonWidth += li.outerWidth({ margin:true });
98
+ buttonWidth += li.outerWidth(true);
99
99
 
100
100
  // TODO determine fix for padding issues to next button
101
101
  buttonWidth += 19;
@@ -0,0 +1,28 @@
1
+ /* jquery.Jcrop.min.css v0.9.10 (build:20120429) */
2
+ .jcrop-holder{direction:ltr;text-align:left;}
3
+ .jcrop-vline,.jcrop-hline{background:#FFF url(/assets/Jcrop.gif) top left repeat;font-size:0;position:absolute;}
4
+ .jcrop-vline{height:100%;width:1px!important;}
5
+ .jcrop-hline{height:1px!important;width:100%;}
6
+ .jcrop-vline.right{right:0;}
7
+ .jcrop-hline.bottom{bottom:0;}
8
+ .jcrop-handle{background-color:#333;border:1px #eee solid;font-size:1px;}
9
+ .jcrop-tracker{-webkit-tap-highlight-color:transparent;-webkit-touch-callout:none;-webkit-user-select:none;height:100%;width:100%;}
10
+ .jcrop-handle.ord-n{left:50%;margin-left:-4px;margin-top:-4px;top:0;}
11
+ .jcrop-handle.ord-s{bottom:0;left:50%;margin-bottom:-4px;margin-left:-4px;}
12
+ .jcrop-handle.ord-e{margin-right:-4px;margin-top:-4px;right:0;top:50%;}
13
+ .jcrop-handle.ord-w{left:0;margin-left:-4px;margin-top:-4px;top:50%;}
14
+ .jcrop-handle.ord-nw{left:0;margin-left:-4px;margin-top:-4px;top:0;}
15
+ .jcrop-handle.ord-ne{margin-right:-4px;margin-top:-4px;right:0;top:0;}
16
+ .jcrop-handle.ord-se{bottom:0;margin-bottom:-4px;margin-right:-4px;right:0;}
17
+ .jcrop-handle.ord-sw{bottom:0;left:0;margin-bottom:-4px;margin-left:-4px;}
18
+ .jcrop-dragbar.ord-n,.jcrop-dragbar.ord-s{height:7px;width:100%;}
19
+ .jcrop-dragbar.ord-e,.jcrop-dragbar.ord-w{height:100%;width:7px;}
20
+ .jcrop-dragbar.ord-n{margin-top:-4px;}
21
+ .jcrop-dragbar.ord-s{bottom:0;margin-bottom:-4px;}
22
+ .jcrop-dragbar.ord-e{margin-right:-4px;right:0;}
23
+ .jcrop-dragbar.ord-w{margin-left:-4px;}
24
+ .jcrop-light .jcrop-vline,.jcrop-light .jcrop-hline{background:#FFF;filter:Alpha(opacity=70)!important;opacity:.70!important;}
25
+ .jcrop-light .jcrop-handle{-moz-border-radius:3px;-webkit-border-radius:3px;background-color:#000;border-color:#FFF;border-radius:3px;}
26
+ .jcrop-dark .jcrop-vline,.jcrop-dark .jcrop-hline{background:#000;filter:Alpha(opacity=70)!important;opacity:.7!important;}
27
+ .jcrop-dark .jcrop-handle{-moz-border-radius:3px;-webkit-border-radius:3px;background-color:#FFF;border-color:#000;border-radius:3px;}
28
+ .jcrop-holder img,img.jcrop-preview{max-width:none;}
metadata CHANGED
@@ -1,18 +1,18 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: alchemy_cms
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.2
5
- prerelease:
4
+ version: 2.4.beta2
5
+ prerelease: 4
6
6
  platform: ruby
7
7
  authors:
8
8
  - Thomas von Deyen
9
- - Robin Böning
9
+ - Robin Boening
10
10
  - Marc Schettke
11
11
  - Carsten Fregin
12
12
  autorequire:
13
13
  bindir: bin
14
14
  cert_chain: []
15
- date: 2013-01-10 00:00:00.000000000 Z
15
+ date: 2012-11-08 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: rails
@@ -21,7 +21,7 @@ dependencies:
21
21
  requirements:
22
22
  - - ~>
23
23
  - !ruby/object:Gem::Version
24
- version: 3.2.11
24
+ version: 3.2.8
25
25
  type: :runtime
26
26
  prerelease: false
27
27
  version_requirements: !ruby/object:Gem::Requirement
@@ -29,23 +29,23 @@ dependencies:
29
29
  requirements:
30
30
  - - ~>
31
31
  - !ruby/object:Gem::Version
32
- version: 3.2.11
32
+ version: 3.2.8
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: authlogic
35
35
  requirement: !ruby/object:Gem::Requirement
36
36
  none: false
37
37
  requirements:
38
- - - ! '>='
38
+ - - ~>
39
39
  - !ruby/object:Gem::Version
40
- version: '0'
40
+ version: 3.1.3
41
41
  type: :runtime
42
42
  prerelease: false
43
43
  version_requirements: !ruby/object:Gem::Requirement
44
44
  none: false
45
45
  requirements:
46
- - - ! '>='
46
+ - - ~>
47
47
  - !ruby/object:Gem::Version
48
- version: '0'
48
+ version: 3.1.3
49
49
  - !ruby/object:Gem::Dependency
50
50
  name: awesome_nested_set
51
51
  requirement: !ruby/object:Gem::Requirement
@@ -83,17 +83,17 @@ dependencies:
83
83
  requirement: !ruby/object:Gem::Requirement
84
84
  none: false
85
85
  requirements:
86
- - - ~>
86
+ - - '='
87
87
  - !ruby/object:Gem::Version
88
- version: 0.5.4
88
+ version: 0.5.5
89
89
  type: :runtime
90
90
  prerelease: false
91
91
  version_requirements: !ruby/object:Gem::Requirement
92
92
  none: false
93
93
  requirements:
94
- - - ~>
94
+ - - '='
95
95
  - !ruby/object:Gem::Version
96
- version: 0.5.4
96
+ version: 0.5.5
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: tvdeyen-fleximage
99
99
  requirement: !ruby/object:Gem::Requirement
@@ -197,7 +197,7 @@ dependencies:
197
197
  requirements:
198
198
  - - ~>
199
199
  - !ruby/object:Gem::Version
200
- version: 2.0.0
200
+ version: 2.1.3
201
201
  type: :runtime
202
202
  prerelease: false
203
203
  version_requirements: !ruby/object:Gem::Requirement
@@ -205,7 +205,7 @@ dependencies:
205
205
  requirements:
206
206
  - - ~>
207
207
  - !ruby/object:Gem::Version
208
- version: 2.0.0
208
+ version: 2.1.3
209
209
  - !ruby/object:Gem::Dependency
210
210
  name: attachment_magic
211
211
  requirement: !ruby/object:Gem::Requirement
@@ -323,33 +323,33 @@ dependencies:
323
323
  requirement: !ruby/object:Gem::Requirement
324
324
  none: false
325
325
  requirements:
326
- - - ~>
326
+ - - ! '>='
327
327
  - !ruby/object:Gem::Version
328
- version: 1.7.0
328
+ version: '0'
329
329
  type: :development
330
330
  prerelease: false
331
331
  version_requirements: !ruby/object:Gem::Requirement
332
332
  none: false
333
333
  requirements:
334
- - - ~>
334
+ - - ! '>='
335
335
  - !ruby/object:Gem::Version
336
- version: 1.7.0
336
+ version: '0'
337
337
  - !ruby/object:Gem::Dependency
338
338
  name: rspec-rails
339
339
  requirement: !ruby/object:Gem::Requirement
340
340
  none: false
341
341
  requirements:
342
- - - '='
342
+ - - ! '>='
343
343
  - !ruby/object:Gem::Version
344
- version: 2.12.0
344
+ version: '0'
345
345
  type: :development
346
346
  prerelease: false
347
347
  version_requirements: !ruby/object:Gem::Requirement
348
348
  none: false
349
349
  requirements:
350
- - - '='
350
+ - - ! '>='
351
351
  - !ruby/object:Gem::Version
352
- version: 2.12.0
352
+ version: '0'
353
353
  - !ruby/object:Gem::Dependency
354
354
  name: sqlite3
355
355
  requirement: !ruby/object:Gem::Requirement
@@ -400,7 +400,6 @@ files:
400
400
  - README.md
401
401
  - Rakefile
402
402
  - alchemy_cms.gemspec
403
- - app/assets/images/alchemy/Jcrop.gif
404
403
  - app/assets/images/alchemy/ajax_loader.gif
405
404
  - app/assets/images/alchemy/alchemy-logo.png
406
405
  - app/assets/images/alchemy/gui/navi-tab.png
@@ -419,7 +418,7 @@ files:
419
418
  - app/assets/images/alchemy/ui-icons_666666_256x240.png
420
419
  - app/assets/images/sassy-ie-overlay.png
421
420
  - app/assets/javascripts/alchemy/alchemy.base.js
422
- - app/assets/javascripts/alchemy/alchemy.buttons.js
421
+ - app/assets/javascripts/alchemy/alchemy.buttons.js.coffee
423
422
  - app/assets/javascripts/alchemy/alchemy.custom.js
424
423
  - app/assets/javascripts/alchemy/alchemy.datepicker.js
425
424
  - app/assets/javascripts/alchemy/alchemy.dirty.js
@@ -436,6 +435,7 @@ files:
436
435
  - app/assets/javascripts/alchemy/alchemy.js_extensions.js
437
436
  - app/assets/javascripts/alchemy/alchemy.link_overlay.js.coffee
438
437
  - app/assets/javascripts/alchemy/alchemy.menubar.js
438
+ - app/assets/javascripts/alchemy/alchemy.onload.js.coffee
439
439
  - app/assets/javascripts/alchemy/alchemy.page_sorter.js
440
440
  - app/assets/javascripts/alchemy/alchemy.preview.js
441
441
  - app/assets/javascripts/alchemy/alchemy.preview_window.js
@@ -455,12 +455,12 @@ files:
455
455
  - app/assets/stylesheets/alchemy/custom.css
456
456
  - app/assets/stylesheets/alchemy/dashboard.css.scss
457
457
  - app/assets/stylesheets/alchemy/elements.css.scss
458
+ - app/assets/stylesheets/alchemy/errors.css.scss
458
459
  - app/assets/stylesheets/alchemy/flash.css.scss
459
460
  - app/assets/stylesheets/alchemy/form_elements.css.scss
460
461
  - app/assets/stylesheets/alchemy/frame.css.scss
461
462
  - app/assets/stylesheets/alchemy/icons.css.scss
462
463
  - app/assets/stylesheets/alchemy/jquery-ui.alchemy.css.scss
463
- - app/assets/stylesheets/alchemy/jquery.Jcrop.css.scss
464
464
  - app/assets/stylesheets/alchemy/login.css.scss
465
465
  - app/assets/stylesheets/alchemy/menubar.css.scss
466
466
  - app/assets/stylesheets/alchemy/modules.css.scss
@@ -509,7 +509,6 @@ files:
509
509
  - app/helpers/alchemy/elements_helper.rb
510
510
  - app/helpers/alchemy/essences_helper.rb
511
511
  - app/helpers/alchemy/pages_helper.rb
512
- - app/helpers/alchemy/pictures_helper.rb
513
512
  - app/helpers/alchemy/url_helper.rb
514
513
  - app/mailers/alchemy/messages.rb
515
514
  - app/mailers/alchemy/notifications.rb
@@ -780,50 +779,7 @@ files:
780
779
  - config/locales/alchemy.de.yml
781
780
  - config/locales/alchemy.en.yml
782
781
  - config/routes.rb
783
- - db/migrate/20100607143125_create_pages.rb
784
- - db/migrate/20100607144254_create_elements.rb
785
- - db/migrate/20100607145256_create_contents.rb
786
- - db/migrate/20100607145719_create_users.rb
787
- - db/migrate/20100607150611_create_pictures.rb
788
- - db/migrate/20100607150812_create_attachments.rb
789
- - db/migrate/20100607153647_create_folded_pages.rb
790
- - db/migrate/20100607161345_create_essence_texts.rb
791
- - db/migrate/20100607162339_create_elements_pages.rb
792
- - db/migrate/20100607193638_create_essence_pictures.rb
793
- - db/migrate/20100607193646_create_essence_richtexts.rb
794
- - db/migrate/20100607193653_create_essence_htmls.rb
795
- - db/migrate/20100609111653_create_essence_dates.rb
796
- - db/migrate/20100609111809_create_essence_files.rb
797
- - db/migrate/20100609111821_create_essence_flashes.rb
798
- - db/migrate/20100609111837_create_essence_videos.rb
799
- - db/migrate/20100616150753_create_essence_audios.rb
800
- - db/migrate/20100812085225_add_crop_from_and_crop_size_to_essence_pictures.rb
801
- - db/migrate/20100909140701_change_essence_htmls_source_column_type.rb
802
- - db/migrate/20101109150312_alter_pages_visible_column_default.rb
803
- - db/migrate/20101109151812_create_languages.rb
804
- - db/migrate/20101216151419_add_language_id_to_pages.rb
805
- - db/migrate/20101216155216_add_index_to_languages.rb
806
- - db/migrate/20101216173323_add_default_to_languages.rb
807
- - db/migrate/20101218130049_add_urlname_index_to_pages.rb
808
- - db/migrate/20110115123343_remove_css_class_default_from_essence_pictures.rb
809
- - db/migrate/20110224105120_change_pages_visible_default.rb
810
- - db/migrate/20110228182659_remove_default_page_layout_from_pages.rb
811
- - db/migrate/20110414163140_remove_display_name_from_elements.rb
812
- - db/migrate/20110511100516_rename_essence_texts_title_to_link_title.rb
813
- - db/migrate/20110529130429_create_cells.rb
814
- - db/migrate/20110529130500_add_cell_id_to_elements.rb
815
- - db/migrate/20110530102804_change_pages_page_layout_column.rb
816
- - db/migrate/20110707190728_add_render_size_to_essence_pictures.rb
817
- - db/migrate/20110711142057_change_open_link_in_new_window_to_link_target.rb
818
- - db/migrate/20110919110451_add_default_role_to_users.rb
819
- - db/migrate/20111116125112_namespace_alchemy_models.rb
820
- - db/migrate/20120216135355_add_country_code_to_languages.rb
821
- - db/migrate/20120608085509_create_alchemy_essence_selects.rb
822
- - db/migrate/20120611221734_create_alchemy_essence_booleans.rb
823
- - db/migrate/20120704181529_add_upload_hash_to_alchemy_picture.rb
824
- - db/migrate/20120705214247_acts_as_taggable_on_migration.rb
825
- - db/migrate/20120728185830_add_cached_tag_list_to_alchemy_pictures.rb
826
- - db/migrate/20120831135441_set_alchemy_languages_country_code_default_to_empty_string.rb
782
+ - db/migrate/20121026100815_alchemy_two_point_three.rb
827
783
  - lib/alchemy/auth_engine.rb
828
784
  - lib/alchemy/authentication_helpers.rb
829
785
  - lib/alchemy/capistrano.rb
@@ -851,6 +807,9 @@ files:
851
807
  - lib/rails/generators/alchemy/elements/elements_generator.rb
852
808
  - lib/rails/generators/alchemy/elements/templates/editor.html.erb
853
809
  - lib/rails/generators/alchemy/elements/templates/view.html.erb
810
+ - lib/rails/generators/alchemy/essence/essence_generator.rb
811
+ - lib/rails/generators/alchemy/essence/templates/editor.html.erb
812
+ - lib/rails/generators/alchemy/essence/templates/view.html.erb
854
813
  - lib/rails/generators/alchemy/page_layouts/page_layouts_generator.rb
855
814
  - lib/rails/generators/alchemy/page_layouts/templates/layout.html.erb
856
815
  - lib/rails/generators/alchemy/plugin/files/translation.pot
@@ -881,6 +840,7 @@ files:
881
840
  - spec/controllers/admin/pages_controller_spec.rb
882
841
  - spec/controllers/admin/resources_controller_spec.rb
883
842
  - spec/controllers/admin/trash_controller_spec.rb
843
+ - spec/controllers/admin/users_controller_spec.rb
884
844
  - spec/controllers/attachments_controller_spec.rb
885
845
  - spec/controllers/base_controller_spec.rb
886
846
  - spec/controllers/elements_controller_spec.rb
@@ -912,6 +872,8 @@ files:
912
872
  - spec/dummy/config/initializers/session_store.rb
913
873
  - spec/dummy/config/initializers/wrap_parameters.rb
914
874
  - spec/dummy/config/routes.rb
875
+ - spec/dummy/db/migrate/20121026100815_alchemy_two_point_three.rb
876
+ - spec/dummy/db/migrate/20121026104128_create_events.rb
915
877
  - spec/dummy/db/schema.rb
916
878
  - spec/dummy/lib/assets/.gitkeep
917
879
  - spec/dummy/public/404.html
@@ -926,10 +888,10 @@ files:
926
888
  - spec/helpers/admin/contents_helper_spec.rb
927
889
  - spec/helpers/admin/elements_helper_spec.rb
928
890
  - spec/helpers/admin/essences_helper_spec.rb
891
+ - spec/helpers/base_helper_spec.rb
929
892
  - spec/helpers/elements_helper_spec.rb
930
893
  - spec/helpers/essences_helper_spec.rb
931
894
  - spec/helpers/pages_helper_spec.rb
932
- - spec/helpers/pictures_helper_spec.rb
933
895
  - spec/helpers/url_helper_spec.rb
934
896
  - spec/integration/admin/link_overlay_spec.rb
935
897
  - spec/integration/admin/modules_integration_spec.rb
@@ -938,6 +900,7 @@ files:
938
900
  - spec/integration/admin/resources_integration_spec.rb
939
901
  - spec/integration/navigation_spec.rb
940
902
  - spec/integration/pages_controller_spec.rb
903
+ - spec/integration/picture_security_spec.rb
941
904
  - spec/integration/security_spec.rb
942
905
  - spec/integration/translation_integration_spec.rb
943
906
  - spec/javascripts/alchemy/link_overlay_spec.js.coffee
@@ -972,11 +935,12 @@ files:
972
935
  - spec/support/alchemy/test_tweaks.rb
973
936
  - spec/support/image.png
974
937
  - spec/url_helpers_spec.rb
938
+ - vendor/assets/images/Jcrop.gif
975
939
  - vendor/assets/javascripts/jquery_plugins/jquery.Jcrop.min.js
976
940
  - vendor/assets/javascripts/jquery_plugins/jquery.dialogextend.min.js
977
941
  - vendor/assets/javascripts/jquery_plugins/jquery.html5uploader.js
978
942
  - vendor/assets/javascripts/jquery_plugins/jquery.scrollTo-1.4.2-min.js
979
- - vendor/assets/javascripts/jquery_plugins/jquery.selectBoxIt.js
943
+ - vendor/assets/javascripts/jquery_plugins/jquery.selectboxit.min.js
980
944
  - vendor/assets/javascripts/jquery_plugins/jquery.ui.nestedSortable.js
981
945
  - vendor/assets/javascripts/jquery_plugins/jquery.ui.tabspaging.js
982
946
  - vendor/assets/javascripts/jquery_plugins/preloadCssImages.jQuery_v5.js
@@ -1073,6 +1037,7 @@ files:
1073
1037
  - vendor/assets/javascripts/tiny_mce/utils/form_utils.js
1074
1038
  - vendor/assets/javascripts/tiny_mce/utils/mctabs.js
1075
1039
  - vendor/assets/javascripts/tiny_mce/utils/validate.js
1040
+ - vendor/assets/stylesheets/jquery.Jcrop.min.css
1076
1041
  homepage: http://alchemy-cms.com
1077
1042
  licenses:
1078
1043
  - BSD New
@@ -1083,18 +1048,15 @@ require_paths:
1083
1048
  required_ruby_version: !ruby/object:Gem::Requirement
1084
1049
  none: false
1085
1050
  requirements:
1086
- - - ! '>='
1051
+ - - ~>
1087
1052
  - !ruby/object:Gem::Version
1088
- version: 1.8.7
1053
+ version: 1.9.2
1089
1054
  required_rubygems_version: !ruby/object:Gem::Requirement
1090
1055
  none: false
1091
1056
  requirements:
1092
- - - ! '>='
1057
+ - - ! '>'
1093
1058
  - !ruby/object:Gem::Version
1094
- version: '0'
1095
- segments:
1096
- - 0
1097
- hash: -3162154013037762335
1059
+ version: 1.3.1
1098
1060
  requirements:
1099
1061
  - ImageMagick (libmagick), v6.6 or greater.
1100
1062
  rubyforge_project:
@@ -1112,6 +1074,7 @@ test_files:
1112
1074
  - spec/controllers/admin/pages_controller_spec.rb
1113
1075
  - spec/controllers/admin/resources_controller_spec.rb
1114
1076
  - spec/controllers/admin/trash_controller_spec.rb
1077
+ - spec/controllers/admin/users_controller_spec.rb
1115
1078
  - spec/controllers/attachments_controller_spec.rb
1116
1079
  - spec/controllers/base_controller_spec.rb
1117
1080
  - spec/controllers/elements_controller_spec.rb
@@ -1143,6 +1106,8 @@ test_files:
1143
1106
  - spec/dummy/config/initializers/session_store.rb
1144
1107
  - spec/dummy/config/initializers/wrap_parameters.rb
1145
1108
  - spec/dummy/config/routes.rb
1109
+ - spec/dummy/db/migrate/20121026100815_alchemy_two_point_three.rb
1110
+ - spec/dummy/db/migrate/20121026104128_create_events.rb
1146
1111
  - spec/dummy/db/schema.rb
1147
1112
  - spec/dummy/lib/assets/.gitkeep
1148
1113
  - spec/dummy/public/404.html
@@ -1157,10 +1122,10 @@ test_files:
1157
1122
  - spec/helpers/admin/contents_helper_spec.rb
1158
1123
  - spec/helpers/admin/elements_helper_spec.rb
1159
1124
  - spec/helpers/admin/essences_helper_spec.rb
1125
+ - spec/helpers/base_helper_spec.rb
1160
1126
  - spec/helpers/elements_helper_spec.rb
1161
1127
  - spec/helpers/essences_helper_spec.rb
1162
1128
  - spec/helpers/pages_helper_spec.rb
1163
- - spec/helpers/pictures_helper_spec.rb
1164
1129
  - spec/helpers/url_helper_spec.rb
1165
1130
  - spec/integration/admin/link_overlay_spec.rb
1166
1131
  - spec/integration/admin/modules_integration_spec.rb
@@ -1169,6 +1134,7 @@ test_files:
1169
1134
  - spec/integration/admin/resources_integration_spec.rb
1170
1135
  - spec/integration/navigation_spec.rb
1171
1136
  - spec/integration/pages_controller_spec.rb
1137
+ - spec/integration/picture_security_spec.rb
1172
1138
  - spec/integration/security_spec.rb
1173
1139
  - spec/integration/translation_integration_spec.rb
1174
1140
  - spec/javascripts/alchemy/link_overlay_spec.js.coffee