mirror of
https://github.com/google/nomulus.git
synced 2025-05-14 16:37:13 +02:00
mv com/google/domain/registry google/registry
This change renames directories in preparation for the great package rename. The repository is now in a broken state because the code itself hasn't been updated. However this should ensure that git correctly preserves history for each file.
This commit is contained in:
parent
a41677aea1
commit
5012893c1d
2396 changed files with 0 additions and 0 deletions
94
java/google/registry/ui/js/registrar/dashboard.js
Normal file
94
java/google/registry/ui/js/registrar/dashboard.js
Normal file
|
@ -0,0 +1,94 @@
|
|||
// Copyright 2016 The Domain Registry Authors. All Rights Reserved.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
goog.provide('registry.registrar.Dashboard');
|
||||
|
||||
goog.require('goog.Timer');
|
||||
goog.require('goog.dom');
|
||||
goog.require('goog.events');
|
||||
goog.require('goog.events.EventType');
|
||||
goog.require('goog.soy');
|
||||
goog.require('goog.style');
|
||||
goog.require('registry.Component');
|
||||
goog.require('registry.soy.registrar.console');
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Dashboard for Registrar Console.
|
||||
* @param {!registry.registrar.Console} console
|
||||
* @constructor
|
||||
* @extends {registry.Component}
|
||||
* @final
|
||||
*/
|
||||
registry.registrar.Dashboard = function(console) {
|
||||
registry.registrar.Dashboard.base(this, 'constructor', console);
|
||||
|
||||
/** @private {number} */
|
||||
this.x_ = 0;
|
||||
|
||||
/** @private {Element} */
|
||||
this.gear_ = null;
|
||||
|
||||
/** @private {goog.Timer} */
|
||||
this.timer_ = null;
|
||||
};
|
||||
goog.inherits(registry.registrar.Dashboard, registry.Component);
|
||||
|
||||
|
||||
/** @override */
|
||||
registry.registrar.Dashboard.prototype.bindToDom = function(id) {
|
||||
registry.registrar.Dashboard.base(this, 'bindToDom', '');
|
||||
goog.dom.removeChildren(goog.dom.getRequiredElement('reg-appbar'));
|
||||
goog.soy.renderElement(goog.dom.getElement('reg-content'),
|
||||
registry.soy.registrar.console.dashboard);
|
||||
goog.events.listen(goog.dom.getElement('rotate'),
|
||||
goog.events.EventType.CLICK,
|
||||
goog.bind(this.rotate_, this));
|
||||
this.gear_ = goog.dom.getRequiredElement('gear');
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Do EPP logout.
|
||||
*/
|
||||
registry.registrar.Dashboard.prototype.doEppLogout = function() {
|
||||
this.console.session.logout();
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Let's do the twist.
|
||||
* @private
|
||||
*/
|
||||
registry.registrar.Dashboard.prototype.rotate_ = function() {
|
||||
this.timer_ = new goog.Timer(10);
|
||||
this.registerDisposable(this.timer_);
|
||||
goog.events.listen(this.timer_, goog.Timer.TICK,
|
||||
goog.bind(this.rotateCall_, this));
|
||||
this.timer_.start();
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* No really this time!
|
||||
* @private
|
||||
*/
|
||||
registry.registrar.Dashboard.prototype.rotateCall_ = function() {
|
||||
this.x_++;
|
||||
goog.style.setStyle(this.gear_, 'transform', 'rotate(' + this.x_ + 'deg)');
|
||||
if (this.x_ == 360) {
|
||||
this.timer_.stop();
|
||||
}
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue