2014-02-17 18:05:39 +01:00
|
|
|
<%= render :partial => "devinfo" %>
|
2015-02-11 15:16:48 +01:00
|
|
|
<%= render :partial => "breadcrumb" %>
|
2014-02-17 18:05:39 +01:00
|
|
|
<%= render :partial=>"socialbuttons" %>
|
|
|
|
|
2014-08-05 20:44:39 +02:00
|
|
|
<div id="maincontent_nowidth" class="col-xs-12 col-sm-12">
|
2014-02-17 18:05:39 +01:00
|
|
|
<ul>
|
|
|
|
<li><a href="#publicview">Public View</a></li>
|
|
|
|
</ul>
|
|
|
|
<div id="publicview">
|
|
|
|
<%= render :partial => "public_show" %>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<script type="text/javascript">
|
2014-07-30 20:33:08 +02:00
|
|
|
$('#watch').click(function() {
|
|
|
|
var checked = this.checked;
|
|
|
|
$.update(
|
|
|
|
'/channels/<%= @channel.id %>/watch',
|
|
|
|
{ flag: checked },
|
|
|
|
function (response) {
|
|
|
|
if (checked) {
|
|
|
|
$("#watchText").text("Un-watch");
|
|
|
|
} else {
|
|
|
|
$("#watchText").text("Watch");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
);
|
|
|
|
});
|
2014-02-17 18:05:39 +01:00
|
|
|
|
|
|
|
$("#devInfoLink").click(function() {
|
|
|
|
$("#devInfo").dialog("open") ;
|
|
|
|
});
|
|
|
|
|
2014-07-30 20:33:08 +02:00
|
|
|
$(document).on('page:load ready', function() {
|
2014-02-17 18:05:39 +01:00
|
|
|
$("#devInfo").dialog({
|
|
|
|
autoOpen:false,
|
|
|
|
resizable:false,
|
|
|
|
width:"500px",
|
|
|
|
position: {
|
|
|
|
my: 'top',
|
|
|
|
at: 'top',
|
2014-08-05 20:44:39 +02:00
|
|
|
of: $('#maincontent_nowidth')
|
2014-02-17 18:05:39 +01:00
|
|
|
},
|
|
|
|
title: "Developer Info",
|
|
|
|
dialogClass: "dev-info-dialog"
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
$("#watch").button();
|
|
|
|
if ($("#watch").attr("checked")) {
|
|
|
|
$("#watchText").text("Un-watch");
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
$("#watchText").text("Watch");
|
|
|
|
}
|
|
|
|
|
2014-08-05 20:44:39 +02:00
|
|
|
$("#maincontent_nowidth").tabs( {
|
2014-02-17 18:05:39 +01:00
|
|
|
select: function( e, ui)
|
|
|
|
{
|
|
|
|
$.cookie('stickyTab', ui.index );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
);
|
|
|
|
|
|
|
|
stickyTab = $.cookie( 'stickyTab' );
|
|
|
|
|
|
|
|
if( ! isNaN( stickyTab ) )
|
|
|
|
{
|
2014-08-05 20:44:39 +02:00
|
|
|
$("#maincontent_nowidth").tabs( 'select', stickyTab );
|
2014-02-17 18:05:39 +01:00
|
|
|
}
|
|
|
|
var current_user = "<%= @mychannel %>" ;
|
|
|
|
|
|
|
|
var channel_id = <%= @channel.id %>;
|
|
|
|
|
|
|
|
$.getJSON('/channels/<%=@channel.id %>/windows.json', createWindows (current_user, channel_id, "public") )
|
|
|
|
.complete(function() {
|
|
|
|
setupColumns(current_user, channel_id);
|
|
|
|
})
|
|
|
|
|
|
|
|
});
|
|
|
|
</script>
|