~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/bugs/javascript/buglisting.js

  • Committer: Launchpad Patch Queue Manager
  • Date: 2011-11-18 21:09:29 UTC
  • mfrom: (14296.1.11 view-flags)
  • Revision ID: launchpad@pqm.canonical.com-20111118210929-4e45u2jlf0pt16ru
[r=allenap][bug=891714] Provide access to feature flags in JavaScript.

Show diffs side-by-side

added added

removed removed

Lines of Context:
149
149
        this.render_navigation();
150
150
    },
151
151
 
 
152
    has_prev: function(){
 
153
        return !Y.Lang.isNull(this.get('current_batch').prev);
 
154
    },
 
155
 
 
156
    has_next: function(){
 
157
        return !Y.Lang.isNull(this.get('current_batch').next);
 
158
    },
 
159
 
152
160
    /**
153
161
     * Enable/disable navigation links as appropriate.
154
162
     */
155
163
    render_navigation: function() {
156
164
        this.get('backwards_navigation').toggleClass(
157
 
            'inactive', this.get('current_batch').prev === null);
 
165
            'inactive', !this.has_prev());
158
166
        this.get('forwards_navigation').toggleClass(
159
 
            'inactive', this.get('current_batch').next === null);
 
167
            'inactive', !this.has_next());
160
168
    },
161
169
 
162
170
    update_from_new_model: function(query, model){
246
254
     */
247
255
    next_batch: function() {
248
256
        var current_batch = this.get('current_batch');
249
 
        if (current_batch.next === undefined){
 
257
        if (!this.has_next()){
250
258
            return;
251
259
        }
252
260
        this.update({
262
270
     */
263
271
    prev_batch: function() {
264
272
        var current_batch = this.get('current_batch');
265
 
        if (current_batch.prev === undefined){
 
273
        if (!this.has_prev()){
266
274
            return;
267
275
        }
268
276
        this.update({