Skip to content

Instantly share code, notes, and snippets.

@joerixaop
Forked from spint/application.js
Created September 4, 2011 21:53

Revisions

  1. joerixaop revised this gist Sep 4, 2011. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions application.js
    Original file line number Diff line number Diff line change
    @@ -17,6 +17,7 @@ $(function(){
    },
    close: function(){
    $(this).dialog('destroy');
    $(this).remove();
    }
    });
    return false;
  2. @spint spint revised this gist Sep 1, 2011. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions application.js
    Original file line number Diff line number Diff line change
    @@ -6,6 +6,7 @@ $(function(){
    var link = $(this);
    $("<div><img src='" + BASEPATH + "images/small-spinner.gif' /> </div>")
    .dialog({
    autoOpen: true, //for info, true is default
    modal: true,
    title: 'Apps used by ' + link.attr('data-name'),
    width: '720',
  3. @spint spint revised this gist Sep 1, 2011. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion application.js
    Original file line number Diff line number Diff line change
    @@ -4,7 +4,7 @@
    $(function(){
    $(".user-link").live('click', function(){
    var link = $(this);
    var $dialog = $("<div><img src='" + BASEPATH + "images/small-spinner.gif' /> </div>")
    $("<div><img src='" + BASEPATH + "images/small-spinner.gif' /> </div>")
    .dialog({
    modal: true,
    title: 'Apps used by ' + link.attr('data-name'),
  4. @spint spint revised this gist Sep 1, 2011. 1 changed file with 1 addition and 3 deletions.
    4 changes: 1 addition & 3 deletions application.js
    Original file line number Diff line number Diff line change
    @@ -4,9 +4,8 @@
    $(function(){
    $(".user-link").live('click', function(){
    var link = $(this);
    var $dialog = $("<div><img src='" + BASEPATH + "images/small-spinner.gif' </div>")
    var $dialog = $("<div><img src='" + BASEPATH + "images/small-spinner.gif' /> </div>")
    .dialog({
    autoOpen: false,
    modal: true,
    title: 'Apps used by ' + link.attr('data-name'),
    width: '720',
    @@ -19,7 +18,6 @@ $(function(){
    $(this).dialog('destroy');
    }
    });
    $dialog.dialog('open');
    return false;
    });
    }
  5. @invalid-email-address Anonymous created this gist Sep 1, 2011.
    25 changes: 25 additions & 0 deletions application.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,25 @@
    // Creates a jQuery UI dialog on the fly, every time a link .user-link is clicked,
    // dialog content will be loaded from the url specified by the clicked link

    $(function(){
    $(".user-link").live('click', function(){
    var link = $(this);
    var $dialog = $("<div><img src='" + BASEPATH + "images/small-spinner.gif' </div>")
    .dialog({
    autoOpen: false,
    modal: true,
    title: 'Apps used by ' + link.attr('data-name'),
    width: '720',
    minHeight: '400',

    open: function(){
    $(this).load(link.attr('href'));
    },
    close: function(){
    $(this).dialog('destroy');
    }
    });
    $dialog.dialog('open');
    return false;
    });
    }