Revision c566f369 snf-cyclades-app/synnefo/ui/static/snf/js/ui/web/ui_public_ips_view.js

b/snf-cyclades-app/synnefo/ui/static/snf/js/ui/web/ui_public_ips_view.js
253 253
        subtitle: "IP addresses",
254 254

  
255 255
        initialize: function(options) {
256
            var self = this;
256 257
            views.PublicIPsOverlay.__super__.initialize.apply(this, arguments);
257 258
            this.subview = new views.PublicIPsView({el:this.$(".public-ips-view")});
258 259
            this.fetcher_params = [snf.config.update_interval, 
......
262 263
                                  snf.config.update_interval_max || 20000,
263 264
                                  true, 
264 265
                                  {is_recurrent: true, update: true}]
266
            this.$(".previous-view-link").live('click', function(){
267
                self.hide();
268
            })
265 269
        },
266 270

  
267 271
        show: function(view) {
272
            this.from_view = view || undefined;
273
            
274
            if (this.from_view) {
275
                this.$(".previous-view-link").show();
276
            } else {
277
                this.$(".previous-view-link").hide();
278
            }
268 279
            if (!this.fetcher) {
269 280
              this.fetcher = snf.storage.public_ips.get_fetcher.apply(snf.storage.public_ips, 
270 281
                                                        _.clone(this.fetcher_params));
......
282 293
            if (this.fetcher) {
283 294
                this.fetcher.stop();
284 295
            }
296
            if (this.from_view) {
297
                this.hiding = true;
298
                this.from_view.skip_reset_on_next_open = true;
299
                this.from_view.show();
300
                this.from_view = undefined;
301
            }
285 302
        }
286 303
        
287 304
    });

Also available in: Unified diff