~ya-bo-ng/juju-gui/bottom-bar-removed

« back to all changes in this revision

Viewing changes to app/views/service.js

  • Committer: j.c.sackett
  • Date: 2013-05-21 16:30:38 UTC
  • mfrom: (678 trunk)
  • mto: (663.4.5 spinners)
  • mto: This revision was merged to the branch mainline in revision 679.
  • Revision ID: jcsackett@canonical.com-20130521163038-d0tips6q0f5al317
Merge trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
This file is part of the Juju GUI, which lets users view and manage Juju
 
3
environments within a graphical interface (https://launchpad.net/juju-gui).
 
4
Copyright (C) 2012-2013 Canonical Ltd.
 
5
 
 
6
This program is free software: you can redistribute it and/or modify it under
 
7
the terms of the GNU Affero General Public License version 3, as published by
 
8
the Free Software Foundation.
 
9
 
 
10
This program is distributed in the hope that it will be useful, but WITHOUT
 
11
ANY WARRANTY; without even the implied warranties of MERCHANTABILITY,
 
12
SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Affero
 
13
General Public License for more details.
 
14
 
 
15
You should have received a copy of the GNU Affero General Public License along
 
16
with this program.  If not, see <http://www.gnu.org/licenses/>.
 
17
*/
 
18
 
1
19
'use strict';
2
20
 
3
21
/**
389
407
          return tabs;
390
408
        },
391
409
 
 
410
        /**
 
411
        Fit to window.  Must be called after the container
 
412
        has been added to the DOM.
 
413
 
 
414
        @method containerAttached
 
415
        */
 
416
        containerAttached: function() {
 
417
          this.fitToWindow();
 
418
        },
 
419
 
392
420
        fitToWindow: function() {
393
421
          function getHeight(node) {
394
422
            if (!node) {
455
483
          var db = this.get('db');
456
484
          var env = db.environment.get('annotations');
457
485
          container.setHTML(this.template(this.gatherRenderData()));
458
 
          this.fitToWindow();
459
486
          // to be able to use this same method for all service views
460
487
          if (container.one('.landscape-controls')) {
461
488
            Y.juju.views.utils.updateLandscapeBottomBar(this.get('landscape'),
775
802
         Attach the plugins.  Must be called after the container
776
803
         has been added to the DOM.
777
804
 
778
 
         @method attachPlugins
 
805
         @method containerAttached
779
806
         */
780
 
        attachPlugins: function() {
 
807
        containerAttached: function() {
 
808
          this.constructor.superclass.containerAttached.call(this);
781
809
          var container = this.get('container');
782
810
          container.all('textarea.config-field').plug(plugins.ResizingTextarea,
783
811
              { max_height: 200,