~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/soyuz/javascript/base.js

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2004-08-03 09:17:25 UTC
  • mfrom: (unknown (missing))
  • Revision ID: Arch-1:rocketfuel@canonical.com%launchpad--devel--0--patch-19
Removed defaultSkin directive to make launchpad work with the latest zope.
Patches applied:

 * steve.alexander@canonical.com/launchpad--devel--0--patch-16
   merge from rocketfuel

 * steve.alexander@canonical.com/launchpad--devel--0--patch-17
   removed use of defaultSkin directive, which has been removed from zope3

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* Copyright 2009 Canonical Ltd.  This software is licensed under the
2
 
 * GNU Affero General Public License version 3 (see the file LICENSE).
3
 
 *
4
 
 * Auxiliary functions used in Soyuz pages
5
 
 *
6
 
 * @module soyuz
7
 
 * @submodule base
8
 
 * @namespace soyuz
9
 
 * @requires yahoo, node
10
 
 */
11
 
 
12
 
YUI.add('lp.soyuz.base', function(Y) {
13
 
 
14
 
var namespace = Y.namespace('lp.soyuz.base');
15
 
 
16
 
 
17
 
/*
18
 
 * Return a node containing a standard failure message to be used
19
 
 * in XHR-based page updates.
20
 
 */
21
 
namespace.makeFailureNode = function (text, handler) {
22
 
    var failure_message = Y.Node.create('<p><span></span><a>Retry</a></p>');
23
 
    failure_message.addClass('update-failure-message');
24
 
    failure_message.one('span').set('text', text);
25
 
 
26
 
    var retry_link = failure_message.one('a')
27
 
        .addClass('update-retry')
28
 
        .set('href', '')
29
 
        .on('click', handler);
30
 
 
31
 
    return failure_message;
32
 
};
33
 
 
34
 
 
35
 
/*
36
 
 * Return a node containing a standard in-progress message to be used
37
 
 * in XHR-based page updates.
38
 
 */
39
 
namespace.makeInProgressNode = function (text) {
40
 
    var in_progress_message = Y.Node.create('<p><span></span></p>');
41
 
    in_progress_message.addClass('update-in-progress-message');
42
 
    in_progress_message.one('span').set('text', text);
43
 
 
44
 
    return in_progress_message;
45
 
};
46
 
 
47
 
}, "0.1", {"requires":["node"]});