mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-03-09 04:25:38 +00:00
+ mergetacular
This commit is contained in:
commit
52138956b0
@ -973,13 +973,21 @@ var DragInfo = function(element, event) {
|
||||
DragInfo.prototype = {
|
||||
// ----------
|
||||
snap: function(event, ui){
|
||||
window.console.log( event, ui);
|
||||
//window.console.log( event, ui);
|
||||
// Step 1: Find the closest group by edge
|
||||
|
||||
// Step 2: Match to the to
|
||||
|
||||
},
|
||||
|
||||
// ----------
|
||||
start: function() {
|
||||
// When a tab drag starts, make it the focused tab.
|
||||
if( !this.item.isAGroup ){
|
||||
Page.setActiveTab(this.item);
|
||||
}
|
||||
},
|
||||
|
||||
// ----------
|
||||
drag: function(event, ui) {
|
||||
if(this.item.isAGroup) {
|
||||
@ -1023,6 +1031,7 @@ DragInfo.prototype = {
|
||||
this.item.reloadBounds();
|
||||
this.item.pushAway();
|
||||
}
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
@ -1041,6 +1050,7 @@ window.Groups = {
|
||||
cancel: '.close',
|
||||
start: function(e, ui) {
|
||||
drag.info = new DragInfo(this, e);
|
||||
drag.info.start();
|
||||
},
|
||||
drag: function(e, ui) {
|
||||
drag.info.drag(e, ui);
|
||||
|
@ -218,8 +218,9 @@ window.Page = {
|
||||
});
|
||||
|
||||
$(window).keyup(function(e){
|
||||
// If you hit escape or return, zoom into the active tab.
|
||||
if(e.which == 27 || e.which == 13)
|
||||
// If you hit escape or return, zoom into the active tab,
|
||||
// but only if a title or other element isn't focused.
|
||||
if((e.which == 27 || e.which == 13) && $(":focus").length == 0 )
|
||||
if( self.getActiveTab() ) self.getActiveTab().zoom();
|
||||
});
|
||||
},
|
||||
@ -585,7 +586,7 @@ UIClass.prototype = {
|
||||
addDevMenu: function() {
|
||||
var self = this;
|
||||
|
||||
var html = '<select style="position:absolute; top:5px;">';
|
||||
var html = '<select style="position:absolute; bottom:5px; right:5px; opacity:.2;">';
|
||||
var $select = $(html)
|
||||
.appendTo('body')
|
||||
.change(function () {
|
||||
@ -595,7 +596,7 @@ UIClass.prototype = {
|
||||
});
|
||||
|
||||
var commands = [{
|
||||
name: '*',
|
||||
name: 'dev menu',
|
||||
code: function() {
|
||||
}
|
||||
}, {
|
||||
|
@ -39,7 +39,30 @@
|
||||
|
||||
<script type="text/javascript;version=1.8" src="js/ui.js"></script>
|
||||
<script type="text/javascript;version=1.8">
|
||||
</script>
|
||||
var uservoiceOptions = {
|
||||
/* required */
|
||||
key: 'mozillalabs',
|
||||
host: 'feedback.mozillalabs.com',
|
||||
forum: '56804',
|
||||
showTab: true,
|
||||
/* optional */
|
||||
alignment: 'left',
|
||||
background_color:'#E9E9E9',
|
||||
text_color: 'black',
|
||||
hover_color: '#AAA',
|
||||
lang: 'en',
|
||||
};
|
||||
|
||||
function _loadUserVoice() {
|
||||
var s = document.createElement('script');
|
||||
s.setAttribute('type', 'text/javascript');
|
||||
s.setAttribute('src', ("https:" == document.location.protocol ? "https://" : "http://") + "cdn.uservoice.com/javascripts/widgets/tab.js");
|
||||
document.getElementsByTagName('head')[0].appendChild(s);
|
||||
}
|
||||
_loadSuper = window.onload;
|
||||
window.onload = (typeof window.onload != 'function') ? _loadUserVoice : function() {
|
||||
_loadSuper(); _loadUserVoice(); };
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
Loading…
x
Reference in New Issue
Block a user