From 071ba56ae9fc5d3231c16a3b8e765bc07edd05eb Mon Sep 17 00:00:00 2001 From: Matchu Date: Sun, 31 Jul 2011 19:24:06 -0400 Subject: [PATCH] public url on Your Items --- app/stylesheets/closet_hangers/_index.sass | 11 ++ app/views/closet_hangers/index.html.haml | 6 + public/javascripts/closet_hangers/index.js | 12 ++ public/stylesheets/compiled/screen.css | 138 ++++++++++++--------- 4 files changed, 105 insertions(+), 62 deletions(-) diff --git a/app/stylesheets/closet_hangers/_index.sass b/app/stylesheets/closet_hangers/_index.sass index 7b427782..9364af11 100644 --- a/app/stylesheets/closet_hangers/_index.sass +++ b/app/stylesheets/closet_hangers/_index.sass @@ -99,6 +99,17 @@ body.closet_hangers-index +awesome-button margin: 0 0.5em + #closet-hangers-share + font-size: 85% + margin-bottom: 1em + + label + font-weight: bold + margin-right: .5em + + input + width: 30em + #closet-hangers clear: both text-align: center diff --git a/app/views/closet_hangers/index.html.haml b/app/views/closet_hangers/index.html.haml index f3f400b0..9be85fe2 100644 --- a/app/views/closet_hangers/index.html.haml +++ b/app/views/closet_hangers/index.html.haml @@ -70,9 +70,15 @@ - unless public_perspective? #closet-hangers-extras + #closet-hangers-share + %label{:for => 'closet-hangers-share-box'} Public URL: + %input#closet-hangers-share-box{:type => 'text', :value => user_closet_hangers_url(@user), :readonly => true} + = link_to "Import from Neopets closet", new_closet_page_path = link_to "Export to Neopets petpage", petpage_user_closet_hangers_path(@user) + + #closet-hangers{:class => public_perspective? ? nil : 'current-user'} - [true, false].each do |owned| .closet-hangers-group{'data-owned' => owned.to_s, :id => "closet-hangers-group-#{owned}"} diff --git a/public/javascripts/closet_hangers/index.js b/public/javascripts/closet_hangers/index.js index 86d4f4f5..bfa4a025 100644 --- a/public/javascripts/closet_hangers/index.js +++ b/public/javascripts/closet_hangers/index.js @@ -487,6 +487,18 @@ $('#closet-hangers-help').toggleClass('hidden'); }); + /* + + Share URL + + */ + + $('#closet-hangers-share-box').mouseover(function () { + $(this).focus(); + }).mouseout(function () { + $(this).blur(); + }); + /* Initialize diff --git a/public/stylesheets/compiled/screen.css b/public/stylesheets/compiled/screen.css index cdca7e8f..ef39858d 100644 --- a/public/stylesheets/compiled/screen.css +++ b/public/stylesheets/compiled/screen.css @@ -770,11 +770,25 @@ body.closet_hangers-index #closet-hangers-extras a:active { top: 1px; } /* line 102, ../../../app/stylesheets/closet_hangers/_index.sass */ +body.closet_hangers-index #closet-hangers-share { + font-size: 85%; + margin-bottom: 1em; +} +/* line 106, ../../../app/stylesheets/closet_hangers/_index.sass */ +body.closet_hangers-index #closet-hangers-share label { + font-weight: bold; + margin-right: 0.5em; +} +/* line 110, ../../../app/stylesheets/closet_hangers/_index.sass */ +body.closet_hangers-index #closet-hangers-share input { + width: 30em; +} +/* line 113, ../../../app/stylesheets/closet_hangers/_index.sass */ body.closet_hangers-index #closet-hangers { clear: both; text-align: center; } -/* line 107, ../../../app/stylesheets/closet_hangers/_index.sass */ +/* line 118, ../../../app/stylesheets/closet_hangers/_index.sass */ body.closet_hangers-index #closet-hangers .object .quantity { -moz-opacity: 0.75; -webkit-opacity: 0.75; @@ -788,26 +802,26 @@ body.closet_hangers-index #closet-hangers .object .quantity { text-align: left; top: 0; } -/* line 117, ../../../app/stylesheets/closet_hangers/_index.sass */ +/* line 128, ../../../app/stylesheets/closet_hangers/_index.sass */ body.closet_hangers-index #closet-hangers .object .quantity span, body.closet_hangers-index #closet-hangers .object .quantity input[type=number] { font-size: 16px; font-weight: bold; } -/* line 121, ../../../app/stylesheets/closet_hangers/_index.sass */ +/* line 132, ../../../app/stylesheets/closet_hangers/_index.sass */ body.closet_hangers-index #closet-hangers .object form { display: none; } -/* line 125, ../../../app/stylesheets/closet_hangers/_index.sass */ +/* line 136, ../../../app/stylesheets/closet_hangers/_index.sass */ body.closet_hangers-index #closet-hangers .object[data-quantity="1"] .quantity { display: none; } -/* line 128, ../../../app/stylesheets/closet_hangers/_index.sass */ +/* line 139, ../../../app/stylesheets/closet_hangers/_index.sass */ body.closet_hangers-index .closet-hangers-group { border-top: 1px solid #006600; margin-bottom: 2em; padding-bottom: 1em; } -/* line 133, ../../../app/stylesheets/closet_hangers/_index.sass */ +/* line 144, ../../../app/stylesheets/closet_hangers/_index.sass */ body.closet_hangers-index .closet-hangers-group > header { border-bottom: 1px solid #aaddaa; display: block; @@ -815,12 +829,12 @@ body.closet_hangers-index .closet-hangers-group > header { padding: 0.25em 0; position: relative; } -/* line 140, ../../../app/stylesheets/closet_hangers/_index.sass */ +/* line 151, ../../../app/stylesheets/closet_hangers/_index.sass */ body.closet_hangers-index .closet-hangers-group > header h3 { font-size: 250%; margin: 0; } -/* line 144, ../../../app/stylesheets/closet_hangers/_index.sass */ +/* line 155, ../../../app/stylesheets/closet_hangers/_index.sass */ body.closet_hangers-index .closet-hangers-group > header .add-closet-list { /* http://www.zurb.com/blog_uploads/0000/0617/buttons-03.html */ -moz-border-radius: 5px; @@ -855,12 +869,12 @@ body.closet_hangers-index .closet-hangers-group > header .add-closet-list:hover body.closet_hangers-index .closet-hangers-group > header .add-closet-list:active { top: 1px; } -/* line 151, ../../../app/stylesheets/closet_hangers/_index.sass */ +/* line 162, ../../../app/stylesheets/closet_hangers/_index.sass */ body.closet_hangers-index .closet-hangers-group > header .add-closet-list:active { margin-bottom: -1.1em; top: auto; } -/* line 155, ../../../app/stylesheets/closet_hangers/_index.sass */ +/* line 166, ../../../app/stylesheets/closet_hangers/_index.sass */ body.closet_hangers-index .closet-hangers-group > header span.show, body.closet_hangers-index .closet-hangers-group > header span.hide { color: #448844; display: none; @@ -869,18 +883,18 @@ body.closet_hangers-index .closet-hangers-group > header span.show, body.closet_ position: absolute; top: 1em; } -/* line 163, ../../../app/stylesheets/closet_hangers/_index.sass */ +/* line 174, ../../../app/stylesheets/closet_hangers/_index.sass */ body.closet_hangers-index .closet-hangers-group > header span.show:hover, body.closet_hangers-index .closet-hangers-group > header span.hide:hover { color: inherit; text-decoration: underline; } -/* line 167, ../../../app/stylesheets/closet_hangers/_index.sass */ +/* line 178, ../../../app/stylesheets/closet_hangers/_index.sass */ body.closet_hangers-index .closet-list { border-bottom: 1px solid #aaddaa; padding: 0.5em 0; position: relative; } -/* line 172, ../../../app/stylesheets/closet_hangers/_index.sass */ +/* line 183, ../../../app/stylesheets/closet_hangers/_index.sass */ body.closet_hangers-index .closet-list .visibility-form { font-size: 85%; left: 0.5em; @@ -889,17 +903,17 @@ body.closet_hangers-index .closet-list .visibility-form { top: 0.25em; z-index: 10; } -/* line 180, ../../../app/stylesheets/closet_hangers/_index.sass */ +/* line 191, ../../../app/stylesheets/closet_hangers/_index.sass */ body.closet_hangers-index .closet-list .visibility-form input, body.closet_hangers-index .closet-list .visibility-form select { font-size: inherit; margin-bottom: 0; margin-top: 0; } -/* line 186, ../../../app/stylesheets/closet_hangers/_index.sass */ +/* line 197, ../../../app/stylesheets/closet_hangers/_index.sass */ body.closet_hangers-index .closet-list .visibility-form select { border-color: white; } -/* line 189, ../../../app/stylesheets/closet_hangers/_index.sass */ +/* line 200, ../../../app/stylesheets/closet_hangers/_index.sass */ body.closet_hangers-index .closet-list .visibility-form input[type=submit] { /* http://www.zurb.com/blog_uploads/0000/0617/buttons-03.html */ -moz-border-radius: 5px; @@ -942,11 +956,11 @@ body.closet_hangers-index .closet-list .visibility-form input[type=submit]:activ body.closet_hangers-index .closet-list .visibility-form input[type=submit]:hover { background-color: #999999; } -/* line 194, ../../../app/stylesheets/closet_hangers/_index.sass */ +/* line 205, ../../../app/stylesheets/closet_hangers/_index.sass */ body.closet_hangers-index .closet-list .visibility-form input[type=submit]:active { top: 1px; } -/* line 197, ../../../app/stylesheets/closet_hangers/_index.sass */ +/* line 208, ../../../app/stylesheets/closet_hangers/_index.sass */ body.closet_hangers-index .closet-list .visibility-form .visibility-descriptions { -moz-opacity: 0.75; -webkit-opacity: 0.75; @@ -957,20 +971,20 @@ body.closet_hangers-index .closet-list .visibility-form .visibility-descriptions list-style: none; padding: 0 0.5em; } -/* line 204, ../../../app/stylesheets/closet_hangers/_index.sass */ +/* line 215, ../../../app/stylesheets/closet_hangers/_index.sass */ body.closet_hangers-index .closet-list .visibility-form .visibility-descriptions li { display: none; } -/* line 208, ../../../app/stylesheets/closet_hangers/_index.sass */ +/* line 219, ../../../app/stylesheets/closet_hangers/_index.sass */ body.closet_hangers-index .closet-list .visibility-form:hover .visibility-descriptions li.current { display: block; } -/* line 211, ../../../app/stylesheets/closet_hangers/_index.sass */ +/* line 222, ../../../app/stylesheets/closet_hangers/_index.sass */ body.closet_hangers-index .closet-list header { display: block; position: relative; } -/* line 215, ../../../app/stylesheets/closet_hangers/_index.sass */ +/* line 226, ../../../app/stylesheets/closet_hangers/_index.sass */ body.closet_hangers-index .closet-list h4 { font-family: Delicious, Helvetica, Arial, Verdana, sans-serif; font-size: 150%; @@ -978,19 +992,19 @@ body.closet_hangers-index .closet-list h4 { margin: 0 auto 0.67em; width: 50%; } -/* line 222, ../../../app/stylesheets/closet_hangers/_index.sass */ +/* line 233, ../../../app/stylesheets/closet_hangers/_index.sass */ body.closet_hangers-index .closet-list .empty-list { display: none; font-style: italic; } -/* line 226, ../../../app/stylesheets/closet_hangers/_index.sass */ +/* line 237, ../../../app/stylesheets/closet_hangers/_index.sass */ body.closet_hangers-index .closet-list .closet-list-controls { display: none; position: absolute; right: 1em; top: 0; } -/* line 232, ../../../app/stylesheets/closet_hangers/_index.sass */ +/* line 243, ../../../app/stylesheets/closet_hangers/_index.sass */ body.closet_hangers-index .closet-list .closet-list-controls a, body.closet_hangers-index .closet-list .closet-list-controls input[type=submit] { /* http://www.zurb.com/blog_uploads/0000/0617/buttons-03.html */ -moz-border-radius: 5px; @@ -1031,36 +1045,36 @@ body.closet_hangers-index .closet-list .closet-list-controls a:active, body.clos body.closet_hangers-index .closet-list .closet-list-controls a:hover, body.closet_hangers-index .closet-list .closet-list-controls input[type=submit]:hover { background-color: #999999; } -/* line 235, ../../../app/stylesheets/closet_hangers/_index.sass */ +/* line 246, ../../../app/stylesheets/closet_hangers/_index.sass */ body.closet_hangers-index .closet-list .closet-list-controls form { display: inline; } -/* line 239, ../../../app/stylesheets/closet_hangers/_index.sass */ +/* line 250, ../../../app/stylesheets/closet_hangers/_index.sass */ body.closet_hangers-index .closet-list[data-hangers-count="0"] .empty-list { display: block; } -/* line 243, ../../../app/stylesheets/closet_hangers/_index.sass */ +/* line 254, ../../../app/stylesheets/closet_hangers/_index.sass */ body.closet_hangers-index .closet-list.unlisted h4 { font-size: 125%; font-style: italic; } -/* line 249, ../../../app/stylesheets/closet_hangers/_index.sass */ +/* line 260, ../../../app/stylesheets/closet_hangers/_index.sass */ body.closet_hangers-index .closet-list:hover .closet-list-controls { display: block; } -/* line 253, ../../../app/stylesheets/closet_hangers/_index.sass */ +/* line 264, ../../../app/stylesheets/closet_hangers/_index.sass */ body.closet_hangers-index .closet-list:hover .visibility-form input[type=submit] { visibility: visible; } -/* line 256, ../../../app/stylesheets/closet_hangers/_index.sass */ +/* line 267, ../../../app/stylesheets/closet_hangers/_index.sass */ body.closet_hangers-index .closet-list:hover .visibility-form select { border-color: #aaddaa; } -/* line 259, ../../../app/stylesheets/closet_hangers/_index.sass */ +/* line 270, ../../../app/stylesheets/closet_hangers/_index.sass */ body.closet_hangers-index .closet-list:last-child { border-bottom: 0; } -/* line 262, ../../../app/stylesheets/closet_hangers/_index.sass */ +/* line 273, ../../../app/stylesheets/closet_hangers/_index.sass */ body.closet_hangers-index .closet-list.droppable-active { -moz-border-radius: 1em; -webkit-border-radius: 1em; @@ -1071,53 +1085,53 @@ body.closet_hangers-index .closet-list.droppable-active { border-style: dotted; margin: 1em 0; } -/* line 269, ../../../app/stylesheets/closet_hangers/_index.sass */ +/* line 280, ../../../app/stylesheets/closet_hangers/_index.sass */ body.closet_hangers-index .closet-list.droppable-active .object { -moz-opacity: 0.25; -webkit-opacity: 0.25; -o-opacity: 0.25; -khtml-opacity: 0.25; } -/* line 273, ../../../app/stylesheets/closet_hangers/_index.sass */ +/* line 284, ../../../app/stylesheets/closet_hangers/_index.sass */ body.closet_hangers-index .closet-list.droppable-active .object.ui-draggable-dragging { -moz-opacity: 1; -webkit-opacity: 1; -o-opacity: 1; -khtml-opacity: 1; } -/* line 276, ../../../app/stylesheets/closet_hangers/_index.sass */ +/* line 287, ../../../app/stylesheets/closet_hangers/_index.sass */ body.closet_hangers-index .closet-list.droppable-active .closet-list-controls { display: none; } -/* line 279, ../../../app/stylesheets/closet_hangers/_index.sass */ +/* line 290, ../../../app/stylesheets/closet_hangers/_index.sass */ body.closet_hangers-index .closet-list.droppable-active .closet-list-hangers { overflow: hidden; } -/* line 282, ../../../app/stylesheets/closet_hangers/_index.sass */ +/* line 293, ../../../app/stylesheets/closet_hangers/_index.sass */ body.closet_hangers-index .closet-list.droppable-active .visibility-form { display: none; } -/* line 286, ../../../app/stylesheets/closet_hangers/_index.sass */ +/* line 297, ../../../app/stylesheets/closet_hangers/_index.sass */ body.closet_hangers-index .closet-hangers-group-autocomplete-item span, body.closet_hangers-index .closet-list-autocomplete-item span { font-style: italic; padding: 0.2em 0.4em; } -/* line 291, ../../../app/stylesheets/closet_hangers/_index.sass */ +/* line 302, ../../../app/stylesheets/closet_hangers/_index.sass */ body.closet_hangers-index .closet-list-autocomplete-item a, body.closet_hangers-index .closet-list-autocomplete-item span { font-size: 85%; padding-left: 2em; } -/* line 298, ../../../app/stylesheets/closet_hangers/_index.sass */ +/* line 309, ../../../app/stylesheets/closet_hangers/_index.sass */ body.closet_hangers-index.current-user #closet-hangers .object:hover form { display: inline; } -/* line 301, ../../../app/stylesheets/closet_hangers/_index.sass */ +/* line 312, ../../../app/stylesheets/closet_hangers/_index.sass */ body.closet_hangers-index.current-user #closet-hangers .object:hover .closet-hanger-destroy { position: absolute; right: 18px; top: 52px; } -/* line 306, ../../../app/stylesheets/closet_hangers/_index.sass */ +/* line 317, ../../../app/stylesheets/closet_hangers/_index.sass */ body.closet_hangers-index.current-user #closet-hangers .object:hover .closet-hanger-destroy input { /* http://www.zurb.com/blog_uploads/0000/0617/buttons-03.html */ -moz-border-radius: 5px; @@ -1158,7 +1172,7 @@ body.closet_hangers-index.current-user #closet-hangers .object:hover .closet-han body.closet_hangers-index.current-user #closet-hangers .object:hover .closet-hanger-destroy input:hover { background-color: #999999; } -/* line 309, ../../../app/stylesheets/closet_hangers/_index.sass */ +/* line 320, ../../../app/stylesheets/closet_hangers/_index.sass */ body.closet_hangers-index.current-user #closet-hangers .object:hover .quantity { -moz-opacity: 1; -webkit-opacity: 1; @@ -1168,77 +1182,77 @@ body.closet_hangers-index.current-user #closet-hangers .object:hover .quantity { top: 0; padding: 0; } -/* line 315, ../../../app/stylesheets/closet_hangers/_index.sass */ +/* line 326, ../../../app/stylesheets/closet_hangers/_index.sass */ body.closet_hangers-index.current-user #closet-hangers .object:hover .quantity span { display: none; } -/* line 318, ../../../app/stylesheets/closet_hangers/_index.sass */ +/* line 329, ../../../app/stylesheets/closet_hangers/_index.sass */ body.closet_hangers-index.current-user #closet-hangers .object:hover .quantity input[type=number] { padding: 2px; width: 2em; } -/* line 322, ../../../app/stylesheets/closet_hangers/_index.sass */ +/* line 333, ../../../app/stylesheets/closet_hangers/_index.sass */ body.closet_hangers-index.current-user #closet-hangers .object:hover .quantity input[type=submit] { font-size: 85%; } -/* line 327, ../../../app/stylesheets/closet_hangers/_index.sass */ +/* line 338, ../../../app/stylesheets/closet_hangers/_index.sass */ body.closet_hangers-index.current-user.js #closet-hangers .object:hover .quantity { display: block; } -/* line 330, ../../../app/stylesheets/closet_hangers/_index.sass */ +/* line 341, ../../../app/stylesheets/closet_hangers/_index.sass */ body.closet_hangers-index.current-user.js #closet-hangers .object:hover .quantity input[type=number] { width: 2.5em; } -/* line 333, ../../../app/stylesheets/closet_hangers/_index.sass */ +/* line 344, ../../../app/stylesheets/closet_hangers/_index.sass */ body.closet_hangers-index.current-user.js #closet-hangers .object:hover .quantity input[type=submit] { display: none; } -/* line 336, ../../../app/stylesheets/closet_hangers/_index.sass */ +/* line 347, ../../../app/stylesheets/closet_hangers/_index.sass */ body.closet_hangers-index.current-user.js #closet-hangers .object.loading { background: #eeffee; outline: 1px solid #006600; } -/* line 340, ../../../app/stylesheets/closet_hangers/_index.sass */ +/* line 351, ../../../app/stylesheets/closet_hangers/_index.sass */ body.closet_hangers-index.current-user.js #closet-hangers .object.loading .quantity { display: block; } -/* line 343, ../../../app/stylesheets/closet_hangers/_index.sass */ +/* line 354, ../../../app/stylesheets/closet_hangers/_index.sass */ body.closet_hangers-index.current-user.js #closet-hangers .object.loading .quantity span:after { content: "…"; } -/* line 347, ../../../app/stylesheets/closet_hangers/_index.sass */ +/* line 358, ../../../app/stylesheets/closet_hangers/_index.sass */ body.closet_hangers-index.current-user.js #closet-hangers-contact form { display: none; } -/* line 350, ../../../app/stylesheets/closet_hangers/_index.sass */ +/* line 361, ../../../app/stylesheets/closet_hangers/_index.sass */ body.closet_hangers-index.current-user.js #closet-hangers-contact .edit-contact-link, body.closet_hangers-index.current-user.js #closet-hangers-contact #cancel-contact-link { display: inline; } -/* line 354, ../../../app/stylesheets/closet_hangers/_index.sass */ +/* line 365, ../../../app/stylesheets/closet_hangers/_index.sass */ body.closet_hangers-index.current-user.js #closet-hangers-contact.editing form { display: block; } -/* line 357, ../../../app/stylesheets/closet_hangers/_index.sass */ +/* line 368, ../../../app/stylesheets/closet_hangers/_index.sass */ body.closet_hangers-index.current-user.js #closet-hangers-contact.editing .edit-contact-link { display: none; } -/* line 362, ../../../app/stylesheets/closet_hangers/_index.sass */ +/* line 373, ../../../app/stylesheets/closet_hangers/_index.sass */ body.closet_hangers-index.current-user.js .closet-hangers-group header .show, body.closet_hangers-index.current-user.js .closet-hangers-group header .hide { cursor: pointer; } -/* line 365, ../../../app/stylesheets/closet_hangers/_index.sass */ +/* line 376, ../../../app/stylesheets/closet_hangers/_index.sass */ body.closet_hangers-index.current-user.js .closet-hangers-group header .hide { display: block; } -/* line 369, ../../../app/stylesheets/closet_hangers/_index.sass */ +/* line 380, ../../../app/stylesheets/closet_hangers/_index.sass */ body.closet_hangers-index.current-user.js .closet-hangers-group.hidden header .hide, body.closet_hangers-index.current-user.js .closet-hangers-group.hidden .closet-hangers-group-content { display: none; } -/* line 372, ../../../app/stylesheets/closet_hangers/_index.sass */ +/* line 383, ../../../app/stylesheets/closet_hangers/_index.sass */ body.closet_hangers-index.current-user.js .closet-hangers-group.hidden header .show { display: block; } -/* line 375, ../../../app/stylesheets/closet_hangers/_index.sass */ +/* line 386, ../../../app/stylesheets/closet_hangers/_index.sass */ body.closet_hangers-index.current-user.js #toggle-help { display: inline; }