mercury-rails 0.6.0 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (61) hide show
  1. data/app/assets/javascripts/mercury.js +1 -0
  2. data/app/assets/javascripts/mercury/lightview.js.coffee +26 -12
  3. data/app/assets/javascripts/mercury/locales/ar.locale.js.coffee +3 -5
  4. data/app/assets/javascripts/mercury/locales/da.locale.js.coffee +3 -5
  5. data/app/assets/javascripts/mercury/locales/de.locale.js.coffee +4 -6
  6. data/app/assets/javascripts/mercury/locales/es.locale.js.coffee +3 -5
  7. data/app/assets/javascripts/mercury/locales/example.local.js.coffee +3 -1
  8. data/app/assets/javascripts/mercury/locales/fr.locale.js.coffee +3 -5
  9. data/app/assets/javascripts/mercury/locales/it.locale.js.coffee +3 -5
  10. data/app/assets/javascripts/mercury/locales/ko.local.js.coffee +4 -6
  11. data/app/assets/javascripts/mercury/locales/nl.locale.js.coffee +3 -5
  12. data/app/assets/javascripts/mercury/locales/pt.locale.js.coffee +3 -5
  13. data/app/assets/javascripts/mercury/locales/sv.local.js.coffee +3 -5
  14. data/app/assets/javascripts/mercury/locales/swedish_chef.locale.js.coffee +3 -5
  15. data/app/assets/javascripts/mercury/locales/zh.local.js.coffee +3 -5
  16. data/app/assets/javascripts/mercury/mercury.js.coffee +1 -1
  17. data/app/assets/javascripts/mercury/modal.js.coffee +38 -23
  18. data/app/assets/javascripts/mercury/modals/htmleditor.js.coffee +1 -0
  19. data/app/assets/javascripts/mercury/modals/insertcharacter.js.coffee +1 -0
  20. data/app/assets/javascripts/mercury/modals/insertlink.js.coffee +111 -60
  21. data/app/assets/javascripts/mercury/modals/insertmedia.js.coffee +80 -35
  22. data/app/assets/javascripts/mercury/modals/insertsnippet.js.coffee +1 -0
  23. data/app/assets/javascripts/mercury/modals/inserttable.js.coffee +59 -51
  24. data/app/assets/javascripts/mercury/page_editor.js.coffee +1 -1
  25. data/app/assets/javascripts/mercury/regions/full.coffee +1 -1
  26. data/app/assets/javascripts/mercury/regions/image.js.coffee +1 -1
  27. data/app/assets/javascripts/mercury/regions/markdown.coffee +1 -1
  28. data/app/assets/javascripts/mercury/regions/simple.js.coffee +1 -1
  29. data/app/assets/javascripts/mercury/regions/snippets.js.coffee +1 -1
  30. data/app/assets/javascripts/mercury/table_editor.js.coffee +16 -0
  31. data/app/assets/javascripts/mercury/toolbar.js.coffee +2 -2
  32. data/app/assets/stylesheets/mercury.css +0 -5
  33. data/app/assets/stylesheets/mercury/bootstrap-ish.css +1367 -0
  34. data/app/assets/stylesheets/mercury/bootstrap-overrides.css +60 -0
  35. data/app/assets/stylesheets/mercury/lightview.css +2 -52
  36. data/app/assets/stylesheets/mercury/mercury.css +2 -2
  37. data/app/assets/stylesheets/mercury/modal.css +13 -31
  38. data/app/assets/stylesheets/mercury/uploader.css +3 -3
  39. data/app/views/mercury/modals/htmleditor.html +2 -6
  40. data/app/views/mercury/modals/link.html +70 -64
  41. data/app/views/mercury/modals/media.html +80 -71
  42. data/app/views/mercury/modals/table.html +79 -73
  43. data/app/views/mercury/snippets/example/options.html.erb +11 -30
  44. data/features/loading/loading.feature +1 -1
  45. data/features/regions/full/inserting_links.feature +4 -4
  46. data/features/regions/full/inserting_media.feature +3 -3
  47. data/features/step_definitions/mercury_steps.rb +5 -5
  48. data/features/support/env.rb +1 -1
  49. data/lib/mercury/version.rb +1 -1
  50. data/spec/javascripts/mercury/lightview_spec.js.coffee +136 -129
  51. data/spec/javascripts/mercury/modal_spec.js.coffee +143 -139
  52. data/spec/javascripts/mercury/modals/insertlink_spec.js.coffee +105 -31
  53. data/spec/javascripts/mercury/modals/insertmedia_spec.js.coffee +76 -38
  54. data/spec/javascripts/mercury/modals/inserttable_spec.js.coffee +32 -35
  55. data/spec/javascripts/mercury/toolbar_spec.js.coffee +8 -0
  56. data/spec/javascripts/templates/mercury/modals/insertlink.html +58 -21
  57. data/spec/javascripts/templates/mercury/modals/insertmedia.html +69 -27
  58. data/spec/javascripts/templates/mercury/modals/inserttable.html +66 -20
  59. metadata +5 -5
  60. data/app/assets/stylesheets/mercury/buttons.css +0 -73
  61. data/app/assets/stylesheets/mercury/form.css +0 -125
@@ -0,0 +1,60 @@
1
+ /*
2
+ * Bootsrap Overrides (overrides what's in bootstrap-ish)
3
+ *---------------------------------------------------------------------------*/
4
+ .btn-group > .btn {
5
+ margin-right: 0;
6
+ }
7
+ form {
8
+ margin-bottom: 0;
9
+ }
10
+ fieldset {
11
+ margin-bottom: 15px;
12
+ background: #F6F6F6;
13
+ border: 1px solid #CCC;
14
+ border-radius: 7px;
15
+ padding: 10px;
16
+ }
17
+ legend {
18
+ display: block;
19
+ position: relative;
20
+ margin-left: 10px;
21
+ font-weight: bold;
22
+ width: auto;
23
+ padding: 0;
24
+ font-size: 12px;
25
+ color: #333333;
26
+ border: 0;
27
+ line-height: 1px;
28
+ }
29
+ select {
30
+ width: auto;
31
+ }
32
+ .form-actions {
33
+ margin-top: 0;
34
+ margin-bottom: 0;
35
+ background-color: transparent;
36
+ }
37
+ .control-group {
38
+ margin-bottom: 0;
39
+ }
40
+ legend + .control-group {
41
+ margin-top: 0;
42
+ -webkit-margin-top-collapse: separate;
43
+ }
44
+ .form-horizontal .control-group {
45
+ margin-bottom: 0;
46
+ }
47
+ .form-horizontal .controls {
48
+ margin-left: 150px;
49
+ }
50
+ .form-horizontal hr {
51
+ margin-left: 150px;
52
+ border: 0;
53
+ border-top: 1px solid #ccc;
54
+ }
55
+ label input[type=radio] {
56
+ margin-right: 5px;
57
+ }
58
+ .form-actions {
59
+ padding-bottom: 0;
60
+ }
@@ -16,7 +16,7 @@
16
16
  position: fixed;
17
17
  z-index: 10040;
18
18
  top: 20px;
19
- background: #EFEFEF;
19
+ background: rgba(239, 239, 239, .7);
20
20
  opacity: 0;
21
21
  overflow: hidden;
22
22
  display: none;
@@ -70,38 +70,6 @@
70
70
  border-top: 1px solid #333;
71
71
  text-align: right;
72
72
  }
73
- /*
74
- * Forms
75
- *----------------------------------------------------------------------------*/
76
- .mercury-lightview form fieldset {
77
- background: #CCC;
78
- border: 1px solid #333;
79
- }
80
- .mercury-lightview form fieldset.buttons {
81
- background: none;
82
- border: none;
83
- }
84
- .mercury-lightview form select,
85
- .mercury-lightview form input[type="text"],
86
- .mercury-lightview form input[type="password"],
87
- .mercury-lightview form textarea,
88
- .mercury-lightview form input.text {
89
- background: #CCC;
90
- color: #000;
91
- border: 2px solid #999;
92
- -moz-box-shadow: inset 0 0 3px #000000;
93
- -webkit-box-shadow: inset 0 0 3px #000000;
94
- box-shadow: inset 0 0 3px #000000;
95
- }
96
- .mercury-lightview form input[type="button"] {
97
- /*border: 2px solid #555;*/
98
- /*border-radius: 4px;*/
99
- /*background: #222;*/
100
- /*color: #FFF;*/
101
- }
102
- .mercury-lightview hr {
103
- border-color: #CCC;
104
- }
105
73
  /*
106
74
  * Specific Lightviews
107
75
  *----------------------------------------------------------------------------*/
@@ -129,23 +97,5 @@
129
97
  color: #09F;
130
98
  }
131
99
  #mercury_about a:hover {
132
- color: #FFF;
133
- }
134
- /* character */
135
- .mercury-lightview #mercury_character .character {
136
- border: 1px solid #444;
137
- background: #222;
138
- }
139
- .mercury-lightview #mercury_character .character:hover {
140
- background: #555;
141
- border: 1px solid #CCC;
142
- }
143
- /* table */
144
- .mercury-lightview #mercury_table #table_display {
145
- background: #222;
146
- border: 1px solid #444;
147
- height: 301px;
148
- }
149
- .mercury-lightview #mercury_table #table_display td.selected {
150
- background: #09F;
100
+ color: #333;
151
101
  }
@@ -1,6 +1,7 @@
1
1
  /*
2
2
  *= require_self
3
- *= require ./form
3
+ *= require ./bootstrap-ish
4
+ *= require ./bootstrap-overrides
4
5
  *= require ./dialog
5
6
  *= require ./lightview
6
7
  *= require ./modal
@@ -8,7 +9,6 @@
8
9
  *= require ./toolbar
9
10
  *= require ./tooltip
10
11
  *= require ./uploader
11
- *= require ./buttons
12
12
  *= require ./all_images
13
13
  */
14
14
 
@@ -98,40 +98,30 @@
98
98
  .mercury-modal .mercury-display-pane-container {
99
99
  overflow: auto;
100
100
  margin: -20px -20px 0;
101
- padding: 20px 20px 10px;
101
+ padding: 20px 20px 0;
102
102
  }
103
103
  .mercury-modal .mercury-display-pane-container .mercury-display-pane {
104
104
  float: left;
105
105
  }
106
106
  .mercury-modal .mercury-display-controls {
107
- padding: 15px 0 0;
107
+ padding-right: 0;
108
108
  border-top: 1px solid #CCC;
109
109
  text-align: right;
110
110
  }
111
111
  /*
112
- * Forms
112
+ * Specific Modals (eg. htmlEditor)
113
113
  *----------------------------------------------------------------------------*/
114
- .mercury-modal textarea {
114
+ /* html editor */
115
+ #mercury_html_editor textarea {
115
116
  resize: none;
116
117
  padding: 0;
117
118
  box-sizing: border-box;
118
119
  -moz-box-sizing: border-box;
119
120
  -webkit-box-sizing: border-box;
120
- }
121
- /*
122
- * Specific Modals (eg. htmlEditor)
123
- *----------------------------------------------------------------------------*/
124
- /* html editor */
125
- #mercury_html_editor textarea {
126
121
  margin: 0 0 -2px 0;
127
- padding: 0;
128
122
  border: 2px solid #CCC;
129
123
  width: 100%;
130
124
  }
131
- #mercury_html_editor .mercury-modal-controls {
132
- border: 0;
133
- margin-top: -2px;
134
- }
135
125
  /* character */
136
126
  #mercury_character .character {
137
127
  float: left;
@@ -156,28 +146,20 @@
156
146
  }
157
147
  /* table */
158
148
  #mercury_table #table_display {
159
- width: 285px;
160
- height: 285px;
161
149
  float: left;
150
+ width: 225px;
151
+ height: 259px;
162
152
  padding: 10px;
163
- background: #F6F6F6;
164
- border: 1px solid #CCC;
165
- border-radius: 7px;
166
- -moz-border-radius: 7px;
167
- overflow: auto;
153
+ margin-right: 13px;
154
+ overflow: auto;
155
+ }
156
+ #mercury_table #table_display .controls {
157
+ margin: 0;
168
158
  }
169
159
  #mercury_table #table_display table {
170
160
  width: 100%;
171
161
  height: 100%;
172
162
  }
173
- #mercury_table #table_display td.selected {
163
+ #mercury_table #table_display .selected {
174
164
  background: #09F;
175
165
  }
176
- #mercury_table #table_options {
177
- width: 383px;
178
- float: left;
179
- margin-left: 10px;
180
- }
181
- #mercury_table #table_options .inputs:first-child label {
182
- width: 36%
183
- }
@@ -12,7 +12,7 @@
12
12
  width: 100%;
13
13
  height: 100%;
14
14
  opacity: .95;
15
- background: rgba(0, 0, 0, .65);
15
+ background: rgba(255, 255, 255, .8);
16
16
  }
17
17
  .mercury-uploader {
18
18
  position: absolute;
@@ -23,13 +23,13 @@
23
23
  height: 150px;
24
24
  overflow: hidden;
25
25
  padding: 15px;
26
- background: rgba(0,0,0, .70);
26
+ background: rgba(239, 239, 239, .70);
27
27
  border-radius: 10px;
28
28
  -moz-border-radius: 10px;
29
29
  -moz-box-shadow: 0 0 40px rgba(0, 0, 0, .9);
30
30
  box-shadow: 0 0 40px rgba(0, 0, 0, .9);
31
31
  font: normal normal normal 12px/normal Helvetica, Tahoma, Arial, sans-serif;
32
- color: #CCC;
32
+ color: #000;
33
33
  }
34
34
  .mercury-uploader .mercury-uploader-preview {
35
35
  float: left;
@@ -2,12 +2,8 @@
2
2
 
3
3
  <textarea class="mercury-display-pane-container" rows="5" style="width:100%"></textarea>
4
4
 
5
- <div class="mercury-display-controls">
6
- <fieldset class="buttons">
7
- <ol>
8
- <li class="commit button"><input class="submit" name="commit" type="submit" value="Save and Replace"/></li>
9
- </ol>
10
- </fieldset>
5
+ <div class="form-actions mercury-display-controls">
6
+ <input class="btn btn-primary" name="commit" type="submit" value="Save and Replace"/>
11
7
  </div>
12
8
 
13
9
  </form>
@@ -1,75 +1,81 @@
1
- <form id="mercury_link" class="mercury-form" style="width:600px">
1
+ <form id="mercury_link" class="form-horizontal" style="width:615px">
2
2
 
3
- <div class="mercury-display-pane-container">
4
- <div class="mercury-display-pane">
3
+ <div class="form-inputs mercury-display-pane-container">
5
4
 
6
- <fieldset class="inputs" id="link_text_container">
7
- <ol>
8
- <li id="link_text_input" class="string input optional stringish">
9
- <label class="label" for="link_text">Link Content</label>
10
- <input id="link_text" name="link[text]" type="text"/>
11
- </li>
12
- </ol>
13
- </fieldset>
5
+ <fieldset id="link_text_container">
6
+ <div class="control-group string optional">
7
+ <label class="string optional control-label" for="link_text">Link Content</label>
8
+ <div class="controls">
9
+ <input class="span6 string optional" id="link_text" name="link[text]" size="50" type="text">
10
+ </div>
11
+ </div>
12
+ </fieldset>
14
13
 
15
- <fieldset class="inputs">
16
- <legend><span>Standard Links</span></legend>
17
- <ol>
18
- <li id="link_external_url_input" class="string input optional stringish">
19
- <label class="label" for="link_external_url"><input name="link_type" type="radio" value="external_url" checked="checked"/>URL</label>
20
- <input class="selectable" id="link_external_url" name="link[external_url]" type="text"/>
21
- </li>
22
- </ol>
23
- </fieldset>
14
+ <fieldset>
15
+ <legend>Standard Links</legend>
16
+ <div class="control-group url optional">
17
+ <label class="url optional control-label" for="link_external_url">
18
+ <input name="link_type" type="radio" value="external_url" checked="checked"/>URL
19
+ </label>
20
+ <div class="controls">
21
+ <input class="span6 string url optional" id="link_external_url" name="link[external_url]" size="50" type="text">
22
+ </div>
23
+ </div>
24
+ </fieldset>
24
25
 
25
- <fieldset class="inputs">
26
- <legend><span>Index / Bookmark Links</span></legend>
27
- <ol>
28
- <li id="link_existing_bookmark_input" class="select input optional">
29
- <label class="label" for="link_existing_bookmark"><input name="link_type" type="radio" value="existing_bookmark"/>Existing Links</label>
30
- <select class="selectable" id="link_existing_bookmark" name="link[existing_bookmark]"></select>
31
- </li>
32
- <li id="link_new_bookmark_input" class="string input optional stringish">
33
- <label class="label" for="link_new_bookmark"><input name="link_type" type="radio" value="new_bookmark"/>Bookmark</label>
34
- <input class="selectable" id="link_new_bookmark" name="link[new_bookmark]" type="text"/>
35
- </li>
36
- </ol>
37
- </fieldset>
26
+ <fieldset>
27
+ <legend>Index / Bookmark Links</legend>
28
+ <div class="control-group select optional">
29
+ <label class="select optional control-label" for="link_existing_bookmark">
30
+ <input name="link_type" type="radio" value="existing_bookmark"/>Existing Links
31
+ </label>
32
+ <div class="controls">
33
+ <select class="select optional" id="link_existing_bookmark" name="link[existing_bookmark]"></select>
34
+ </div>
35
+ </div>
36
+ <div class="control-group string optional">
37
+ <label class="string optional control-label" for="link_new_bookmark">
38
+ <input name="link_type" type="radio" value="new_bookmark"/>Bookmark
39
+ </label>
40
+ <div class="controls">
41
+ <input class="string optional" id="link_new_bookmark" name="link[new_bookmark]" size="50" type="text">
42
+ </div>
43
+ </div>
44
+ </fieldset>
38
45
 
39
- <fieldset class="inputs">
40
- <legend><span>Options</span></legend>
41
- <ol>
42
- <li id="link_target_input" class="select input optional">
43
- <label class="label" for="link_target">Link Target</label>
44
- <select id="link_target" name="link[target]">
45
- <option value="">Self (the same window or tab)</option>
46
- <option value="_blank">Blank (a new window or tab)</option>
47
- <option value="_top">Top (removes any frames)</option>
48
- <option value="popup">Popup Window (javascript new window popup)</option>
49
- </select>
50
- </li>
51
- <div id="popup_options" class="link-target-options" style="display:none">
52
- <li id="link_popup_width_input" class="string input optional stringish">
53
- <label class="label" for="link_popup_width">Popup Width</label>
54
- <input id="link_popup_width" name="link[popup_width]" type="text"/>
55
- </li>
56
- <li id="link_popup_height_input" class="string input optional stringish">
57
- <label class="label" for="link_popup_height">Popup Height</label>
58
- <input id="link_popup_height" name="link[popup_height]" type="text"/>
59
- </li>
46
+ <fieldset>
47
+ <legend>Options</legend>
48
+ <div class="control-group select optional">
49
+ <label class="select optional control-label" for="link_target">Link Target</label>
50
+ <div class="controls">
51
+ <select class="select optional" id="link_target" name="link[target]">
52
+ <option value="">Self (the same window or tab)</option>
53
+ <option value="_blank">Blank (a new window or tab)</option>
54
+ <option value="_top">Top (removes any frames)</option>
55
+ <option value="popup">Popup Window (javascript new window popup)</option>
56
+ </select>
57
+ </div>
58
+ </div>
59
+ <div id="popup_options" class="link-target-options" style="display:none">
60
+ <div class="control-group number optional">
61
+ <label class="number optional control-label" for="link_popup_width">Popup Width</label>
62
+ <div class="controls">
63
+ <input class="span2 number optional" id="link_popup_width" name="link[popup_width]" size="50" type="number" value="960">
60
64
  </div>
61
- </ol>
62
- </fieldset>
65
+ </div>
66
+ <div class="control-group number optional">
67
+ <label class="number optional control-label" for="link_popup_height">Popup Height</label>
68
+ <div class="controls">
69
+ <input class="span2 number optional" id="link_popup_height" name="link[popup_height]" size="50" type="number" value="800">
70
+ </div>
71
+ </div>
72
+ </div>
73
+ </fieldset>
63
74
 
64
- </div>
65
75
  </div>
66
76
 
67
- <div class="mercury-display-controls">
68
- <fieldset class="buttons">
69
- <ol>
70
- <li class="commit button"><input class="submit" name="commit" type="submit" value="Insert Link"/></li>
71
- </ol>
72
- </fieldset>
77
+ <div class="form-actions mercury-display-controls">
78
+ <input class="btn btn-primary" name="commit" type="submit" value="Insert Link">
73
79
  </div>
74
80
 
75
- </form>
81
+ </form>
@@ -1,82 +1,91 @@
1
- <form id="mercury_media" class="mercury-form" style="width:600px">
1
+ <form id="mercury_media" class="form-horizontal" style="width:615px">
2
2
 
3
- <div class="mercury-display-pane-container">
4
- <div class="mercury-display-pane">
3
+ <div class="form-inputs mercury-display-pane-container">
5
4
 
6
- <fieldset class="inputs">
7
- <legend><span>Images</span></legend>
8
- <ol>
9
- <li id="media_image_url_input" class="string input optional stringish">
10
- <label class="label" for="media_image_url"><input name="media_type" type="radio" value="image_url" checked="checked"/>URL</label>
11
- <input class="selectable" id="media_image_url" name="media[image_url]" type="text"/>
12
- </li>
13
- </ol>
14
- </fieldset>
5
+ <fieldset>
6
+ <legend>Images</legend>
7
+ <div class="control-group url optional">
8
+ <label class="url optional control-label" for="media_image_url">
9
+ <input name="media_type" type="radio" value="image_url" checked="checked"/>URL
10
+ </label>
11
+ <div class="controls">
12
+ <input class="span6 string url optional" id="media_image_url" name="media[image_url]" size="50" type="text">
13
+ </div>
14
+ </div>
15
+ </fieldset>
15
16
 
16
- <fieldset class="inputs">
17
- <legend><span>Videos</span></legend>
18
- <ol>
19
- <li id="media_youtube_url_input" class="string input optional stringish">
20
- <label class="label" for="media_youtube_url"><input name="media_type" type="radio" value="youtube_url"/>YouTube Share URL</label>
21
- <input class="selectable" id="media_youtube_url" name="media[youtube_url]" type="text" placeholder="http://youtu.be/Pny4hoN8eII"/>
22
- </li>
23
- <li id="media_vimeo_url_input" class="string input optional stringish">
24
- <label class="label" for="media_vimeo_url"><input name="media_type" type="radio" value="vimeo_url"/>Vimeo URL</label>
25
- <input class="selectable" id="media_vimeo_url" name="media[vimeo_url]" type="text" placeholder="http://vimeo.com/25708134"/>
26
- </li>
27
- </ol>
28
- </fieldset>
17
+ <fieldset>
18
+ <legend>Videos</legend>
19
+ <div class="control-group url optional">
20
+ <label class="url optional control-label" for="media_youtube_url">
21
+ <input name="media_type" type="radio" value="youtube_url"/>YouTube URL
22
+ </label>
23
+ <div class="controls">
24
+ <input class="span6 string url optional" id="media_youtube_url" name="media[youtube_url]" size="50" type="text" placeholder="http://youtu.be/Pny4hoN8eII">
25
+ </div>
26
+ </div>
27
+ <div class="control-group url optional">
28
+ <label class="url optional control-label" for="media_vimeo_url">
29
+ <input name="media_type" type="radio" value="vimeo_url"/>Vimeo URL
30
+ </label>
31
+ <div class="controls">
32
+ <input class="span6 string url optional" id="media_vimeo_url" name="media[vimeo_url]" size="50" type="text" placeholder="http://vimeo.com/25708134">
33
+ </div>
34
+ </div>
35
+ </fieldset>
29
36
 
30
- <fieldset class="inputs">
31
- <legend><span>Options</span></legend>
32
- <ol>
33
- <div id="image_url" class="media-options">
34
- <li id="media_image_alignment_input" class="select input optional">
35
- <label class="label" for="media_image_alignment">Alignment</label>
36
- <select id="media_image_alignment" name="media[image_alignment]">
37
- <option value="">None</option>
38
- <option value="left">Left</option>
39
- <option value="right">Right</option>
40
- <option value="top">Top</option>
41
- <option value="middle">Middle</option>
42
- <option value="bottom">Bottom</option>
43
- <option value="absmiddle">Absolute Middle</option>
44
- <option value="absbottom">Absolute Bottom</option>
45
- </select>
46
- </li>
37
+ <fieldset>
38
+ <legend>Options</legend>
39
+ <div class="media-options" id="image_url_options">
40
+ <div class="control-group select optional">
41
+ <label class="select optional control-label" for="media_image_alignment">Alignment</label>
42
+ <div class="controls">
43
+ <select class="select optional" id="media_image_alignment" name="media[image_alignment]">
44
+ <option value="">None</option>
45
+ <option value="left">Left</option>
46
+ <option value="right">Right</option>
47
+ <option value="top">Top</option>
48
+ <option value="middle">Middle</option>
49
+ <option value="bottom">Bottom</option>
50
+ <option value="absmiddle">Absolute Middle</option>
51
+ <option value="absbottom">Absolute Bottom</option>
52
+ </select>
53
+ </div>
54
+ </div>
55
+ </div>
56
+ <div class="media-options" id="youtube_url_options" style="display:none">
57
+ <div class="control-group number optional">
58
+ <label class="number optional control-label" for="media_youtube_width">Width</label>
59
+ <div class="controls">
60
+ <input class="span2 number optional" id="media_youtube_width" name="media[youtube_width]" size="50" type="number" value="560">
61
+ </div>
62
+ </div>
63
+ <div class="control-group number optional">
64
+ <label class="number optional control-label" for="media_youtube_height">Height</label>
65
+ <div class="controls">
66
+ <input class="span2 number optional" id="media_youtube_height" name="media[youtube_height]" size="50" type="number" value="349">
47
67
  </div>
48
- <div id="youtube_url" class="media-options" style="display:none">
49
- <li id="media_youtube_width_input" class="string input optional stringish">
50
- <label class="label" for="media_youtube_width">Width</label>
51
- <input id="media_youtube_width" name="media[youtube_width]" type="text" value="560"/>
52
- </li>
53
- <li id="media_youtube_height_input" class="string input optional stringish">
54
- <label class="label" for="media_youtube_height">Height</label>
55
- <input id="media_youtube_height" name="media[youtube_height]" type="text" value="349"/>
56
- </li>
68
+ </div>
69
+ </div>
70
+ <div class="media-options" id="vimeo_url_options" style="display:none">
71
+ <div class="control-group number optional">
72
+ <label class="number optional control-label" for="media_vimeo_width">Width</label>
73
+ <div class="controls">
74
+ <input class="span2 number optional" id="media_vimeo_width" name="media[vimeo_width]" size="50" type="number" value="400">
57
75
  </div>
58
- <div id="vimeo_url" class="media-options" style="display:none">
59
- <li id="media_vimeo_width_input" class="string input optional stringish">
60
- <label class="label" for="media_vimeo_width">Width</label>
61
- <input id="media_vimeo_width" name="media[vimeo_width]" type="text" value="400"/>
62
- </li>
63
- <li id="media_vimeo_height_input" class="string input optional stringish">
64
- <label class="label" for="media_vimeo_height">Height</label>
65
- <input id="media_vimeo_height" name="media[vimeo_height]" type="text" value="225"/>
66
- </li>
76
+ </div>
77
+ <div class="control-group number optional">
78
+ <label class="number optional control-label" for="media_vimeo_height">Height</label>
79
+ <div class="controls">
80
+ <input class="span2 number optional" id="media_vimeo_height" name="media[vimeo_height]" size="50" type="number" value="225">
67
81
  </div>
68
- </ol>
69
- </fieldset>
82
+ </div>
83
+ </div>
84
+ </fieldset>
70
85
 
71
- </div>
72
86
  </div>
73
-
74
- <div class="mercury-display-controls">
75
- <fieldset class="buttons">
76
- <ol>
77
- <li class="commit button"><input class="submit" name="commit" type="submit" value="Insert Media"/></li>
78
- </ol>
79
- </fieldset>
87
+ <div class="form-actions mercury-display-controls">
88
+ <input class="btn btn-primary" name="commit" type="submit" value="Insert Media"/>
80
89
  </div>
81
90
 
82
- </form>
91
+ </form>