Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

moved layout, snippet, stylesheets, javascript removal into a popups

  • Loading branch information...
commit b69719a4af5a09e20814f1e3a00b332178371cfb 1 parent 08d48be
John W. Long jlong authored
5 stylesheets/admin/partials/_popup.sass
View
@@ -32,17 +32,18 @@ div.popup
border-top: 1px solid #ccc
border-left: 1px solid #ccc
+box-shadow(#fff, 1px, 1px, 0)
- height: 200px
margin: 1em 0
overflow: auto
table.index
- margin-top: -1px
+ margin: -1px 0 0
.buttons
font-size: 90%
margin-top: 1.5em
input.button
font-size: 130%
+ a.cancel
+ color: $alt-link-color
.tag_description, .snippet_description
border-bottom: 1px dotted silver
6 views/admin/javascripts/index.haml
View
@@ -12,19 +12,19 @@
%img{:title=>"", :src=>"/images/admin/javascript.png", :alt=>"javascript_icon"}/
%a{:href=>"/admin/javascripts/edit", :title=>"/javascripts/controls.js"} controls.js
%td.actions
- = link_to image('minus.png') + " Remove", "/admin/javascripts/remove", :class=>"action"
+ = link_to image('minus.png') + " Remove", "/admin/javascripts/remove", :class=>"action popup"
%tr.javascript#javascript_2
%td.name
%img{:title=>"", :src=>"/images/admin/javascript.png", :alt=>"javascript_icon"}/
%a{:href=>"/admin/javascripts/edit", :title=>"/javascripts/effects.js"} effects.js
%td.actions
- = link_to image('minus.png') + " Remove", "/admin/javascripts/remove", :class=>"action"
+ = link_to image('minus.png') + " Remove", "/admin/javascripts/remove", :class=>"action popup"
%tr.javascript#javascript_3
%td.name
%img{:title=>"", :src=>"/images/admin/javascript.png", :alt=>"javascript_icon"}/
%a{:href=>"/admin/javascripts/edit", :title=>"/javascripts/prototype.js"} prototype.js
%td.actions
- = link_to image('minus.png') + " Remove", "/admin/javascripts/remove", :class=>"action"
+ = link_to image('minus.png') + " Remove", "/admin/javascripts/remove", :class=>"action popup"
#actions
%ul
18 views/admin/javascripts/remove.haml
View
@@ -1,18 +0,0 @@
-- @selected = :javascripts
-
-%h1 Remove Javascript
-
-%p Are you sure you want to <strong class="warning">permanently remove</strong> the following javascript?
-
-%table.index#javascripts
- %tbody
- %tr.javascript#javascript_4
- %td.name
- %img{:src=>"/images/admin/javascript.png", :alt=>"javascript_icon", :title=>""}/
- screen.css
-
-%form{:method=>"post", :action=>"/admin/javascripts/index.haml", "data-onsubmit_status"=>"Removing javascript&#8230;"}
- %p.buttons
- %input.button{:type=>"submit", :value=>"Delete Javascript"}/
- or
- %a{:href=>"/admin/javascripts"} Cancel
1  views/admin/javascripts/remove/_layout.haml
View
@@ -0,0 +1 @@
+= yield
21 views/admin/javascripts/remove/index.haml
View
@@ -0,0 +1,21 @@
+- popup_id = "remove_stylesheet_popup_#{Time.now.to_i}"
+
+.popup.textured{:id=>popup_id}
+ %form{:method=>"post", :action=>"/admin/javascripts/", "data-onsubmit_status"=>"Removing javascript&#8230;"}
+ %h3.title Remove Javascript
+
+ .head
+ %p Are you sure you want to <strong class="warning">permanently remove</strong> the following javascript?
+
+ .viewport{:style=>"height: 100px"}
+ %table.index
+ %tbody
+ %tr.javascript#javascript_4
+ %td.name
+ %img{:src=>"/images/admin/javascript.png", :alt=>"javascript_icon", :title=>""}/
+ controls.js
+
+ %p.buttons
+ %input.button{:type=>"submit", :value=>"Delete Javascript"}/
+ or
+ %a.cancel{:href=>"javascript: Element.closePopup('#{popup_id}')"} Cancel
12 views/admin/layouts/index.haml
View
@@ -13,25 +13,19 @@
%img{:title=>"", :src=>"/images/admin/layout.png", :alt=>"" }/
%a{:href=>"/admin/layouts/edit" } Two Column
%td.actions
- %a.action{:href=>"/admin/layouts/remove" }
- = image('minus.png')
- Remove
+ = link_to image('minus.png') + " Remove", "/admin/layouts/remove", :class => "action popup"
%tr.layout#layout_2
%td.name
%img{:title=>"", :src=>"/images/admin/layout.png", :alt=>"" }/
%a{:href=>"/admin/layouts/edit" } Three Column
%td.actions
- %a.action{:href=>"/admin/layouts/remove" }
- = image('minus.png')
- Remove
+ = link_to image('minus.png') + " Remove", "/admin/layouts/remove", :class => "action popup"
%tr.layout#layout_3
%td.name
%img{:title=>"", :src=>"/images/admin/layout.png", :alt=>"" }/
%a{:href=>"/admin/layouts/edit" } XML Feed
%td.actions
- %a.action{:href=>"/admin/layouts/remove" }
- = image('minus.png')
- Remove
+ = link_to image('minus.png') + " Remove", "/admin/layouts/remove", :class => "action popup"
#actions
%ul
5 views/admin/layouts/index_after_layout_removed.haml
View
@@ -1,5 +0,0 @@
-- content_for :flash_message do
- #notice
- %p The layout was successfully removed.
-
-= render :template => "index"
18 views/admin/layouts/remove.haml
View
@@ -1,18 +0,0 @@
-- @selected = :layouts
-
-%h1 Remove Layout
-
-%p Are you sure you want to <strong class="warning">permanently remove</strong> the following layout?
-
-%table.index#layouts
- %tbody
- %tr.node.level_1#layout_4
- %td.layout
- %img.icon{:src=>"/images/admin/layout.png", :alt=>"", :title=>""}/
- %span.title XML Feed
-
-%form{:method=>"post", :action=>"/admin/layouts/index_after_layout_removed.haml"}
- %p.buttons
- %input.button{:type=>"submit", :value=>"Delete Layout"}/
- or
- %a{:href=>"/admin/layouts"} Cancel
1  views/admin/layouts/remove/_layout.haml
View
@@ -0,0 +1 @@
+= yield
21 views/admin/layouts/remove/index.haml
View
@@ -0,0 +1,21 @@
+- popup_id = "remove_layout_popup_#{Time.now.to_i}"
+
+.popup.textured{:id=>popup_id}
+ %form{:method=>"post", :action=>"/admin/layouts/", "data-onsubmit_status"=>"Removing layout&#8230;"}
+ %h3.title Remove Layout
+
+ .head
+ %p Are you sure you want to <strong class="warning">permanently remove</strong> the following layout?
+
+ .viewport{:style=>"height: 100px"}
+ %table.index
+ %tbody
+ %tr.node.level_0#layout_4
+ %td.layout.name
+ %img.icon{:src=>"/images/admin/layout.png", :alt=>"", :title=>""}/
+ %span.title XML Feed
+
+ %p.buttons
+ %input.button{:type=>"submit", :value=>"Delete Layout"}/
+ or
+ %a.cancel{:href=>"javascript: Element.closePopup('#{popup_id}')"} Cancel
4 views/admin/pages/remove/index.haml
View
@@ -7,8 +7,8 @@
.head
%p Are you sure you want to <strong class="warning">permanently remove</strong> the following pages?
- .viewport
- %table#pages.index
+ .viewport{:style=>"height: 200px"}
+ %table.index
%tbody
%tr.page.level_0.children_visible#page_4
%td.name{:style=>"padding-left: 4px"}
9 views/admin/snippets/index.haml
View
@@ -13,17 +13,14 @@
%img{:title=>"", :src=>"/images/admin/snippet.png", :alt=>""}/
%a{:href=>"/admin/snippets/edit"} footer
%td.actions
- %a.action{:href=>"/admin/snippets/remove"}
- = image('minus.png')
- Remove
+ = link_to image('minus.png') + " Remove", "/admin/snippets/remove", :class => "action popup"
+
%tr.snippet
%td.name
%img{:title=>"", :src=>"/images/admin/snippet.png", :alt=>""}/
%a{:href=>"/admin/snippets/edit"} header
%td.actions
- %a.action{:href=>"/admin/snippets/remove"}
- = image('minus.png')
- Remove
+ = link_to image('minus.png') + " Remove", "/admin/snippets/remove", :class => "action popup"
#actions
%ul
18 views/admin/snippets/remove.haml
View
@@ -1,18 +0,0 @@
-- @selected = :snippets
-
-%h1 Remove Snippet
-
-%p Are you sure you want to <strong class="warning">permanently remove</strong> the following snippet?
-
-%table.index#snippets
- %tbody
- %tr.snippet#snippet_4
- %td.name
- %img.icon{:src=>"/images/admin/snippet.png", :alt=>"", :title=>""}/
- %span.title footer
-
-%form{:method=>"post", :action=>"/admin/snippets/", "data-onsubmit_status"=>"Removing snippet&#8230;"}
- %p.buttons
- %input.button{:type=>"submit", :value=>"Delete Snippet"}/
- or
- %a{:href=>"/admin/snippets"} Cancel
1  views/admin/snippets/remove/_layout.haml
View
@@ -0,0 +1 @@
+= yield
21 views/admin/snippets/remove/index.haml
View
@@ -0,0 +1,21 @@
+- popup_id = "remove_snippet_popup_#{Time.now.to_i}"
+
+.popup.textured{:id=>popup_id}
+ %form{:method=>"post", :action=>"/admin/snippets/", "data-onsubmit_status"=>"Removing snippet&#8230;"}
+ %h3.title Remove Snippet
+
+ .head
+ %p Are you sure you want to <strong class="warning">permanently remove</strong> the following snippet?
+
+ .viewport{:style=>"height: 100px"}
+ %table.index
+ %tbody
+ %tr.snippet#snippet_4
+ %td.name
+ %img.icon{:src=>"/images/admin/snippet.png", :alt=>"", :title=>""}/
+ %span.title footer
+
+ %p.buttons
+ %input.button{:type=>"submit", :value=>"Delete Snippet"}/
+ or
+ %a.cancel{:href=>"javascript: Element.closePopup('#{popup_id}')"} Cancel
6 views/admin/stylesheets/index.haml
View
@@ -13,19 +13,19 @@
%img{:title=>"", :src=>"/images/admin/stylesheet.png", :alt=>""}/
%a{:href=>"/admin/stylesheets/edit", :title=>"/stylesheets/print.css"} print.css
%td.actions
- = link_to image('minus.png') + " Remove", "/admin/stylesheets/remove", :class=>"action"
+ = link_to image('minus.png') + " Remove", "/admin/stylesheets/remove", :class=>"action popup"
%tr.stylesheet#stylesheet_2
%td.name
%img{:title=>"", :src=>"/images/admin/stylesheet.png", :alt=>""}/
%a{:href=>"/admin/stylesheets/edit", :title=>"/stylesheets/screen.css"} screen.css
%td.actions
- = link_to image('minus.png') + " Remove", "/admin/stylesheets/remove", :class=>"action"
+ = link_to image('minus.png') + " Remove", "/admin/stylesheets/remove", :class=>"action popup"
%tr.stylesheet#stylesheet_3
%td.name
%img.icon{:title=>"", :src=>"/images/admin/stylesheet.png", :alt=>""}/
%a{:href=>"/admin/stylesheets/edit", :title=>"/stylesheets/shared.css"} shared.css
%td.actions
- = link_to image('minus.png') + " Remove", "/admin/stylesheets/remove", :class=>"action"
+ = link_to image('minus.png') + " Remove", "/admin/stylesheets/remove", :class=>"action popup"
#actions
%ul
18 views/admin/stylesheets/remove.haml
View
@@ -1,18 +0,0 @@
-- @selected = :stylesheets
-
-%h1 Remove Stylesheet
-
-%p Are you sure you want to <strong class="warning">permanently remove</strong> the following stylesheet?
-
-%table.index#stylesheets
- %tbody
- %tr.stylesheet#stylesheet_4
- %td.name
- %img{:src=>"/images/admin/stylesheet.png", :alt=>"", :title=>""}/
- screen.css
-
-%form{:method=>"post", :action=>"/admin/stylesheets/index.haml", "data-onsubmit_status"=>"Removing stylesheet&#8230;"}
- %p.buttons
- %input.button{:type=>"submit", :value=>"Delete Stylesheet"}/
- or
- %a{:href=>"/admin/stylesheets"} Cancel
1  views/admin/stylesheets/remove/_layout.haml
View
@@ -0,0 +1 @@
+= yield
21 views/admin/stylesheets/remove/index.haml
View
@@ -0,0 +1,21 @@
+- popup_id = "remove_stylesheet_popup_#{Time.now.to_i}"
+
+.popup.textured{:id=>popup_id}
+ %form{:method=>"post", :action=>"/admin/stylesheets/", "data-onsubmit_status"=>"Removing stylesheet&#8230;"}
+ %h3.title Remove Stylesheet
+
+ .head
+ %p Are you sure you want to <strong class="warning">permanently remove</strong> the following stylesheet?
+
+ .viewport{:style=>"height: 100px"}
+ %table.index
+ %tbody
+ %tr.stylesheet#stylesheet_4
+ %td.name
+ %img.icon{:src=>"/images/admin/stylesheet.png", :alt=>"", :title=>""}/
+ screen.css
+
+ %p.buttons
+ %input.button{:type=>"submit", :value=>"Delete Stylesheet"}/
+ or
+ %a.cancel{:href=>"javascript: Element.closePopup('#{popup_id}')"} Cancel
Please sign in to comment.
Something went wrong with that request. Please try again.