# ==== Options
# * <tt>:id</tt> - HTML ID of the button
# * <tt>:class</tt> - Additional CSS class, generally 'red-button' for deletions
+ # * <tt>:button_key</tt> - Default is 'confirm'
# * <tt>:title_key</tt> -
# * <tt>:message_key</tt> -
# * <tt>:message_params</tt> -
clazz = options[:class]
id = "id='#{options[:id]}'" if options[:id]
title_key = options[:title_key]
+ button_key = options[:button_key]
message_key = options[:message_key]
message_params = options[:message_params]
width = options[:width]||500
url += "&mk=#{message_key}&"
url += message_params.map{|p| "mp=#{u p}"}.join('&') if message_params
end
+ if button_key
+ url += "&bk=#{button_key}"
+ end
"<a href='#{url}' modal-width='#{width}' class='open-modal button #{clazz}' #{id}>#{h label}</a>"
end
*/
/* styles used by modal windows */
-.ui-helper-hidden { display: none; }
-.ui-helper-hidden-accessible { position: absolute !important; clip: rect(1px 1px 1px 1px); }
-.ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; }
-.ui-helper-clearfix:before, .ui-helper-clearfix:after { content: ""; display: table; }
-.ui-helper-clearfix:after { clear: both; }
-.ui-helper-clearfix { zoom: 1; }
-.ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); }
-.ui-widget-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%;background: none repeat scroll 0 0 rgba(0, 0, 0, 0.5) }
-.ui-widget .ui-widget { font-size: 1em; }
-.ui-widget-content { border: 1px solid #dddddd; background: #eeeeee 50% top repeat-x; color: #333333; }
-.ui-widget-content a { color: #333333; }
-.ui-widget-header { border: 1px solid #e78f08; background: #f6a828 50% 50% repeat-x; color: #ffffff; font-weight: bold; }
-.ui-widget-header a { color: #ffffff; }
-.ui-widget-shadow { margin: -5px 0 0 -5px; padding: 5px; background: #000000 50% 50% repeat-x; opacity: .20;filter:Alpha(Opacity=20); -moz-border-radius: 5px; -khtml-border-radius: 5px; -webkit-border-radius: 5px; border-radius: 5px; }
-.ui-dialog { position: absolute; width: 300px; overflow: hidden; box-shadow: 10px 10px 20px rgba(0, 0, 0, 0.5);background-color: #FFF}
-.ui-dialog .ui-dialog-titlebar { display:none }
-.ui-dialog .ui-dialog-content { position: relative; border: 0; background: none; overflow: auto; zoom: 1; }
\ No newline at end of file
+.ui-helper-hidden {
+ display: none;
+}
+
+.ui-helper-hidden-accessible {
+ position: absolute !important;
+ clip: rect(1px 1px 1px 1px);
+}
+
+.ui-helper-reset {
+ margin: 0;
+ padding: 0;
+ border: 0;
+ outline: 0;
+ line-height: 1.3;
+ text-decoration: none;
+ font-size: 100%;
+ list-style: none;
+}
+
+.ui-helper-clearfix:before, .ui-helper-clearfix:after {
+ content: "";
+ display: table;
+}
+
+.ui-helper-clearfix:after {
+ clear: both;
+}
+
+.ui-helper-clearfix {
+ zoom: 1;
+}
+
+.ui-helper-zfix {
+ width: 100%;
+ height: 100%;
+ top: 0;
+ left: 0;
+ position: absolute;
+ opacity: 0;
+ filter: Alpha(Opacity = 0);
+}
+
+.ui-widget-overlay {
+ position: absolute;
+ top: 0;
+ left: 0;
+ margin: 0;
+ padding: 0;
+ background-color: #000000;
+ -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=80)";
+ filter: alpha(opacity = 50);
+ opacity: 0.5;
+}
+
+.ui-widget .ui-widget {
+ font-size: 1em;
+}
+
+.ui-widget-content {
+ border: 1px solid #dddddd;
+ background: #eeeeee 50% top repeat-x;
+ color: #333333;
+}
+
+.ui-widget-content a {
+ color: #333333;
+}
+
+.ui-widget-header {
+ border: 1px solid #e78f08;
+ background: #f6a828 50% 50% repeat-x;
+ color: #ffffff;
+ font-weight: bold;
+}
+
+.ui-widget-header a {
+ color: #ffffff;
+}
+
+.ui-widget-shadow {
+ margin: -5px 0 0 -5px;
+ padding: 5px;
+ background: #000000 50% 50% repeat-x;
+ opacity: .20;
+ filter: Alpha(Opacity = 20);
+ -moz-border-radius: 5px;
+ -khtml-border-radius: 5px;
+ -webkit-border-radius: 5px;
+ border-radius: 5px;
+}
+
+.ui-dialog {
+ position: absolute;
+ width: 300px;
+ overflow: hidden;
+ box-shadow: 10px 10px 20px rgba(0, 0, 0, 0.5);
+ background-color: #FFF
+}
+
+.ui-dialog .ui-dialog-titlebar {
+ display: none
+}
+
+.ui-dialog .ui-dialog-content {
+ position: relative;
+ border: 0;
+ background: none;
+ overflow: auto;
+ zoom: 1;
+}
\ No newline at end of file