Revert "12/21 modernizations from TG live"

This commit is contained in:
LetterJay
2016-12-22 22:35:44 -06:00
committed by GitHub
parent cf59ac1c3d
commit ae40d4134e
2215 changed files with 86928 additions and 707332 deletions
+4 -29
View File
@@ -5,7 +5,7 @@
component.exports = {
computed: {
clickable () {
if (this.get('enabled') && (!this.get('state') || this.get('state') == "toggle")) {
if (this.get('enabled') && !this.get('state')) {
return true
}
return false
@@ -18,8 +18,6 @@
},
styles () {
let extra = ''
if (this.get('class'))
extra += ' ' + this.get('class');
if (this.get('tooltip-side'))
extra = ` tooltip-${this.get('tooltip-side')}`
if (this.get('grid'))
@@ -35,35 +33,15 @@
} else {
return `inactive disabled ${extra}`
}
}
},
}
},
oninit () {
this.on('press', (event) => {
const { action, params } = this.get()
act(this.get('config.ref'), action, params)
event.node.blur()
})
},
data: {
iconStackToHTML(icon_stack){ //turns a string such as 'square-o 2x, twitter 1x' into fully valid fontawesome syntax+HTML
let resultHTML = '';
let icons = icon_stack.split(',');
if(icons.length){
resultHTML += '<span class=\"fa-stack\">';
for (let iconinfo of icons){
let regex = /([\w\-]+)\s*(\dx)/g;
let components = regex.exec(iconinfo);
let icon = components[1]; //0 is the entire string
let size = components[2];
resultHTML += '<i class=\"fa fa-' + icon + ' fa-stack-' + size + '\"></i>';
}
}
if(resultHTML){
resultHTML += '</span>';
}
return resultHTML;
}
}
}
}
</script>
@@ -77,8 +55,5 @@
{{#if icon}}
<i class='fa fa-{{icon}}'></i>
{{/if}}
{{#if icon_stack}}
{{{iconStackToHTML(icon_stack)}}}
{{/if}}
{{yield}}
</span>
+2 -5
View File
@@ -14,8 +14,8 @@ span.button
@extend {context} $fontReset
display: inline-block
vertical-align: middle
min-height: 20px
line-height: @min-height - 3px
height: 20px
line-height: @height - 3px
padding: 0 5px
white-space: nowrap
@@ -27,7 +27,6 @@ span.button
buttoncolor(normal, button-color-normal)
buttoncolor(disabled, button-color-disabled)
buttoncolor(selected, button-color-selected)
buttoncolor(toggle, button-color-selected)
buttoncolor(caution, button-color-caution)
buttoncolor(danger, button-color-danger)
@@ -40,5 +39,3 @@ span:not(.button) + span.button
span.button + span:not(.button)
margin-left: 5px
+9 -11
View File
@@ -19,7 +19,7 @@ component.exports = {
const onrelease = (event) => this.set({ drag: false, x: null, y: null })
this.observe('config.fancy', (newkey, oldkey, keypath) => {
winset(this.get('config.window'), 'titlebar', !newkey && this.get('config.titlebar'))
winset(this.get('config.window'), 'titlebar', !newkey)
if (newkey) {
document.addEventListener('mousemove', ondrag)
@@ -46,13 +46,11 @@ component.exports = {
}
</script>
{{#if config.titlebar}}
<header class='titlebar' on-mousedown='drag'>
<i class='statusicon fa fa-eye fa-2x {{visualStatus}}'></i>
<span class='title'>{{yield}}</span>
{{#if config.fancy}}
<i class='minimize fa fa-minus fa-2x' on-click='minimize'></i>
<i class='close fa fa-close fa-2x' on-click='close'></i>
{{/if}}
</header>
{{/if}}
<header class='titlebar' on-mousedown='drag'>
<i class='statusicon fa fa-eye fa-2x {{visualStatus}}'></i>
<span class='title'>{{yield}}</span>
{{#if config.fancy}}
<i class='minimize fa fa-minus fa-2x' on-click='minimize'></i>
<i class='close fa fa-close fa-2x' on-click='close'></i>
{{/if}}
</header>