Created
May 13, 2014 13:58
-
-
Save peteroome/bd891a224c1133e7cd54 to your computer and use it in GitHub Desktop.
Admin form CS
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
class window.FAdminForm | |
PREFILL_CONTENT = | |
general_news: | |
title: 'General News' | |
body: '<p><strong><a href=""></a></strong> have </p> | |
<p></p> | |
<p></p> | |
<p><strong>See Also: <a href="URL">TITLE</a></strong><br/> | |
<strong>See Also: <a href="URL">TITLE</a></strong></p>' | |
seo_title: 'Page Title: | News | The 405' | |
seo_keywords: 'music news, the 405, news' | |
new_music: | |
title: 'New Music' | |
body: '<p><strong><a href=""></a></strong> have </p> | |
<p>Listen below.</p> | |
<p></p> | |
<strong><p>Wanna hear more music like this? Check out <a href="http://bit.ly/1o1e5cq">405 Radio</a>, or our <a href="http://thefourohfive.com/new-music">New Music</a> section.</p></strong>' | |
seo_title: 'Page Title: | New Music | The 405' | |
seo_keywords: 'new music, the 405, news, music, listen' | |
tour_news: | |
title: 'Tour News' | |
body: '<p><strong><a href=""></a></strong> have </p> | |
<p>Their forthcoming live dates are as follows:</p> | |
<ul> | |
<li></li> | |
</ul> | |
<p><strong>See Also: <a href="URL">TITLE</a></strong><br/> | |
<strong>See Also: <a href="URL">TITLE</a></strong></p>' | |
seo_title: 'Page Title: | News | The 405' | |
seo_keywords: 'Keywords: music news, the 405, news' | |
festival_news: | |
title: 'Festival News' | |
body: "<p><strong><a href=''></a></strong> have added</p> | |
<p>The latest additions are as follows:</p> | |
<p></p> | |
<p>They'll join the likes of </p> | |
<p>The festival takes place .<a href='' target='blank'>Tickets</a> are on sale now.</p> | |
<strong><p>Wanna hear a continuous stream of music on the site? Check out <a href='http://bit.ly/1o1e5cq'>405 Radio</a>, or our <a href='http://thefourohfive.com/new-music'>New Music</a> section. Both are filled with great music.</p></strong>" | |
tag_list: 'festival news' | |
seo_title: 'Page Title: | News | The 405' | |
seo_keywords: 'music news, the 405, news, festival news' | |
new_album: | |
title: 'New Album' | |
body: '<p><strong><a href=""></a></strong> have </p> | |
<p></p> | |
<p>Check out the tracklisting below:</p> | |
<ul> | |
<li></li> | |
</ul> | |
<p></p> | |
<p><strong>See Also: <a href="URL">TITLE</a></strong><br/> | |
<strong>See Also: <a href="URL">TITLE</a></strong></p>' | |
seo_title: 'Page Title: | News | The 405' | |
seo_keywords: 'music news, the 405, news, new album' | |
album_stream: | |
title: 'Album Stream' | |
body: '<p><strong><a href="">NAME</a></strong><p> | |
<p></p> | |
<p>You can listen to the album below courtesy of <em><a href="" target="blank">NPR</a></em>. The album is released on .</p> | |
<p><embed src="http://www.npr.org/v2/?i=236368819&m=236228564;t=audio" height="386" wmode="opaque" allowfullscreen="true" width="386" base="http://www.npr.org" type="application/x-shockwave-flash"></embed></p> | |
<ul> | |
<li><strong>Tracklisting:</strong></li> | |
</ul> | |
<strong><p>Head <a href="http://www.thefourohfive.com/page/the-405-user-review-139" target="blank">here</a> to submit your own review of this album.</p></strong>' | |
tag_list: 'album-streams' | |
seo_title: 'Page Title: | New Music | The 405' | |
seo_keywords: 'new music, the 405, news, music, listen' | |
album_stream_reviews: | |
title: 'Album Stream (if reviewed)' | |
body: "<em><p></p></em> | |
<p>That's <a href=''>what we thought of</a> <strong><a href=''></a></strong>'s new album, but what do you think? Listen to it below courtesy of <em><a href='' target='blank'>NPR</a></em> and let us know in the comments section. The album is released on March 31st.</p> | |
<p><embed src='http://www.npr.org/v2/?i=291166267&m=291913688;t=audio' height='386' wmode='opaque' allowfullscreen='true' width='386' base='http://www.npr.org' type='application/x-shockwave-flash'></embed></p> | |
<ul> | |
<li><strong>Tracklisting:</strong></li> | |
</ul> | |
<strong><p>Head <a href='http://www.thefourohfive.com/page/the-405-user-review-139' target='blank'>here</a> to submit your own review of this album.</p></strong>" | |
tag_list: 'album-streams' | |
seo_title: 'Page Title: | New Music | The 405' | |
seo_keywords: 'new music, the 405, news, music, listen' | |
artist_of_the_day: | |
title: 'Artist of the Day' | |
body: "<p></p> | |
<strong><p><em>You can view more of his work by heading <strong><a href=''>here</a></strong>. If you'd like to be featured in this series, please <a href='mailto:hello@thefourohfive.com?subject=Art Submission' target='blank'>email us</a>.</em></p></strong> | |
<p><img src='URL' width='100%' /><br /> | |
<img src='URL' width='100%' /><br /> | |
<img src='URL' width='100%' /><br /> | |
<img src='URL' width='100%' /><br /> | |
<img src='URL' width='100%' /></p>" | |
tag_list: 'Artist Of The Day' | |
seo_title: 'Page Title: | Art | The 405' | |
seo_keywords: 'artist of the day, the 405, art, features' | |
flickr_of_the_day: | |
title: 'Flickr of the Day' | |
body: "<p></p> | |
<strong><p><em>You can view more of his work by heading <strong><a href=''>here</a></strong>. If you'd like to be featured in this series, please <a href='mailto:hello@thefourohfive.com?subject=Art Submission' target='blank'>email us</a>.</em></p></strong> | |
<p><img src='URL' width='100%' /><br /> | |
<img src='URL' width='100%' /><br /> | |
<img src='URL' width='100%' /><br /> | |
<img src='URL' width='100%' /><br /> | |
<img src='URL' width='100%' /></p>" | |
tag_list: 'Flickr Of The Day' | |
seo_title: 'Page Title: | Art | The 405' | |
seo_keywords: 'Flickr of the day, the 405, art, features' | |
seo_description: "Today's Flickr of the Day is from" | |
constructor: (@selector)-> | |
@form = $ "form#{selector}" | |
@prefillSelectLabel = "select#prefill" | |
@populatePrefillDropdown @bindPrefill | |
populatePrefillDropdown: (callback) => | |
dropdown = $ @prefillSelectLabel, @form | |
console.log @PREFILL_CONTENT | |
for category in @PREFILL_CONTENT | |
console.log category | |
# Creates the item | |
option = "<option value='#{category}'>#{category.title}</option>" | |
console.log option | |
# Appends it within your select element | |
dropdown.append option | |
if callback | |
callback() | |
bindPrefill: => | |
$(@form).on("change", @prefillSelectLabel, @prefill) | |
prefill: (event) => | |
event.preventDefault() | |
console.log $(event.currentTarget).val() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment