forked from refinery/refinerycms
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9f37f0d
commit 3221ab5
Showing
4 changed files
with
66 additions
and
90 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
@init_interface = -> | ||
$("body#dialog_container.dialog").addClass "iframed" if parent and parent.document.location.href != document.location.href | ||
$("input:submit:not(.button)").addClass "button" | ||
unless $.browser.msie | ||
$("#page_container, .wym_box").corner "5px bottom" | ||
$(".wym_box").corner "5px tr" | ||
$(".field > .wym_box").corner "5px tl" | ||
$(".wym_iframe iframe").corner "2px" | ||
$(".form-actions:not(\".form-actions-dialog\")").corner "5px" | ||
$("#recent_activity li a, #recent_inquiries li a").each (i, a) -> | ||
$(this).textTruncate | ||
width: $(this).width() | ||
tooltip: false | ||
|
||
$("textarea.wymeditor").each -> | ||
textarea = $(this) | ||
if (instance = WYMeditor.INSTANCES[$((textarea.next(".wym_box").find("iframe").attr("id") or "").split("_")).last().get(0)])? | ||
if (next = textarea.parent().next())? and next.length > 0 | ||
next.find("input, textarea").keydown($.proxy((e) -> | ||
shiftHeld = e.shiftKey | ||
if shiftHeld and e.keyCode == $.ui.keyCode.TAB | ||
@_iframe.contentWindow.focus() | ||
e.preventDefault() | ||
, instance)).keyup (e) -> | ||
shiftHeld = false | ||
if (prev = textarea.parent().prev())? and prev.length > 0 | ||
prev.find("input, textarea").keydown $.proxy((e) -> | ||
if e.keyCode == $.ui.keyCode.TAB | ||
@_iframe.contentWindow.focus() | ||
e.preventDefault() | ||
, instance) | ||
|
||
if ($menu = $("#menu")).length > 0 | ||
$menu.jcarousel | ||
vertical: false | ||
scroll: 1 | ||
buttonNextHTML: "<img src='/assets/refinery/carousel-right.png' alt='down' height='15' width='10' />" | ||
buttonPrevHTML: "<img src='/assets/refinery/carousel-left.png' alt='up' height='15' width='10' />" | ||
listTag: $menu.get(0).tagName.toLowerCase() | ||
itemTag: $menu.children(":first").get(0).tagName.toLowerCase() | ||
|
||
if $menu.outerWidth() < $("#page_container").outerWidth() | ||
$("#page_container:not('.login #page_container')").corner "5px tr" | ||
else | ||
$("#page_container:not('.login #page_container')").uncorner() | ||
$("#current_locale li a").click (e) -> | ||
$("#current_locale li a span").each (span) -> | ||
$(this).css "display", (if $(this).css("display") == "none" then "" else "none") | ||
|
||
$("#other_locales").animate | ||
opacity: "toggle" | ||
height: "toggle" | ||
, 250 | ||
$("html,body").animate scrollTop: $("#other_locales").parent().offset().top, 250 | ||
e.preventDefault() | ||
|
||
$("#existing_image img").load -> | ||
$("form.edit_image .form-actions").css "margin-top": ($("#existing_image").height() - $("form.edit_image").height() + 8) | ||
|
||
$(".form-actions .form-actions-left input:submit#submit_button").click (e) -> | ||
$("<img src='/assets/refinery/ajax-loader.gif' width='16' height='16' class='save-loader' />").appendTo $(this).parent() | ||
|
||
$("a.suppress").live "click", (e) -> | ||
e.preventDefault() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,4 +14,5 @@ | |
*= require ./site_bar | ||
*= require ./admin | ||
*= require ./submenu | ||
*= require ./interface | ||
*/ |