193
* Extension for views to provide viewmode controls.
195
* @class viewmodeControllingView
197
ns.ViewmodeControlsViewExtension = function() {};
198
ns.ViewmodeControlsViewExtension.prototype = {
200
* Binds the viewmode controls on the page to the viewmode change events.
202
* @method _bindViewmodeControls
203
* @param {Y.Widget} controls The viewmode control widget.
205
_bindViewmodeControls: function(controls) {
206
this._fullscreen = controls.on(
207
controls.EVT_FULLSCREEN, this._goFullscreen, this);
208
this._sidebar = controls.on(
209
controls.EVT_SIDEBAR, this._goSidebar, this);
210
this._minimized = controls.on(
211
controls.EVT_TOGGLE_VIEWABLE, this._toggleMinimized, this);
212
this._destroy = this.on('destroy', function() {
213
this._fullscreen.detach();
214
this._sidebar.detach();
215
this._minimized.detach();
216
this._destroy.detach();
221
Upon clicking the browser icon make sure we re-route to the
224
@method _goFullscreen
225
@param {Event} ev the click event handler on the button.
228
_goFullscreen: function(ev) {
230
this.fire('viewNavigate', {
232
viewmode: 'fullscreen'
238
Upon clicking the build icon make sure we re-route to the
242
@param {Event} ev the click event handler on the button.
245
_goSidebar: function(ev) {
247
this.fire('viewNavigate', {
255
* Place holder to toggle the minimized view; in minimized this should show
256
* sidebar, in sidebar this should show minimized.
257
* @method _toggleMinimized
258
* @param {Event} ev event to trigger the toggle.
261
_toggleMinimized: function(ev) {}