fix javascript errors

This commit is contained in:
Lee Lawlor
2014-08-01 22:10:21 -04:00
parent 28bc4e18e5
commit b598a83e37
5 changed files with 94 additions and 81 deletions

View File

@ -12,20 +12,25 @@
<div id="private_dialog1" class="column" > </div>
</div>
<script>
$(document).on('page:load ready', function() {
$("#devInfoLink_private").click(
function(e) {
// when the document is ready
$(document).on('page:load ready', function() {
// when the devinfo link is clicked
$("#devInfoLink_private").click(function(e) {
var element = $("#devInfo");
openDialogCenter(element);
});
$("#portletAddLink_private").click(
function(e) {
$("#addPortlets").load('/channels/<%=@channel.id %>/hidden_windows?visibility_flag=private',
function(e) {
return false;
});
// when the add window link is clicked
$("#portletAddLink_private").click(function(e) {
$("#addPortlets").load('/channels/<%=@channel.id %>/hidden_windows?visibility_flag=private', function(e) {
var element = $("#addPortlets");
openDialogCenter(element);
}) ;
});
return false;
});
});
</script>

View File

@ -31,21 +31,26 @@
</div>
<script>
// when the document is ready
$(document).on('page:load ready', function() {
// when the devinfo link is clicked
$("#devInfoLink_public").click(function() {
var element = $("#devInfo");
openDialogCenter(element);
});
var element = $("#devInfo");
openDialogCenter(element);
return false;
});
$("#portletAddLink_public").click(function()
{
// when the add window link is clicked
$("#portletAddLink_public").click(function() {
$("#addPortlets").load('/channels/<%=@channel.id %>/hidden_windows?visibility_flag=public', function() {
var element = $("#addPortlets");
openDialogCenter(element);
});
return false;
});
$("#addPortlets").load('/channels/<%=@channel.id %>/hidden_windows?visibility_flag=public',
function() {
var element = $("#addPortlets");
openDialogCenter(element);
})
});
});
// comment flag function
function commentflag(m_id, user_id)