2014-02-17 18:05:39 +01:00
|
|
|
<%= render :partial => "devinfo" %>
|
|
|
|
|
|
|
|
<div class="col-xs-12 col-sm-6">
|
|
|
|
|
|
|
|
<ol class="breadcrumb">
|
|
|
|
<li><%= link_to t(:channels), auth_channels_path %></li>
|
|
|
|
<li class="active"><%= t(:channel) %> <%= @channel.id %></li>
|
|
|
|
</ol>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<%= render :partial=>"socialbuttons" %>
|
|
|
|
|
|
|
|
<div id="maincontent">
|
|
|
|
<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',
|
|
|
|
of: $('#maincontent')
|
|
|
|
},
|
|
|
|
title: "Developer Info",
|
|
|
|
dialogClass: "dev-info-dialog"
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
$("#watch").button();
|
|
|
|
if ($("#watch").attr("checked")) {
|
|
|
|
$("#watchText").text("Un-watch");
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
$("#watchText").text("Watch");
|
|
|
|
}
|
|
|
|
|
|
|
|
$("#maincontent").tabs( {
|
|
|
|
select: function( e, ui)
|
|
|
|
{
|
|
|
|
$.cookie('stickyTab', ui.index );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
);
|
|
|
|
|
|
|
|
stickyTab = $.cookie( 'stickyTab' );
|
|
|
|
|
|
|
|
if( ! isNaN( stickyTab ) )
|
|
|
|
{
|
|
|
|
$("#maincontent").tabs( 'select', stickyTab );
|
|
|
|
}
|
|
|
|
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>
|
|
|
|
|