зеркало из https://github.com/mozilla/WebBuilder.git
added widget to bootstrap add-on
This commit is contained in:
Родитель
e4b6574f23
Коммит
948724dd11
|
@ -1,6 +0,0 @@
|
|||
|
||||
body
|
||||
{
|
||||
font-family: Segoe UI, Trebuchet MS, Helvetica, Arial;
|
||||
font-size: 14px;
|
||||
}
|
|
@ -1,99 +0,0 @@
|
|||
header, section, footer, aside, nav, article, figure
|
||||
{
|
||||
display: block;
|
||||
}
|
||||
|
||||
html, body
|
||||
{
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
body, div, dl, dt, dd, ul, ol, li, h1, h2, h3, h4, h5, h6, pre, code, form, fieldset, legend, input, textarea, p,blockquote, th, td
|
||||
{
|
||||
margin:0;
|
||||
padding:0;
|
||||
}
|
||||
|
||||
table
|
||||
{
|
||||
border-collapse:collapse;
|
||||
border-spacing:0;
|
||||
}
|
||||
|
||||
fieldset, img
|
||||
{
|
||||
border:0;
|
||||
}
|
||||
/*
|
||||
TODO think about hanlding inheritence differently, maybe letting IE6 fail a bit...
|
||||
*/
|
||||
address,
|
||||
caption,
|
||||
cite,
|
||||
code,
|
||||
dfn,
|
||||
em,
|
||||
strong,
|
||||
th,
|
||||
var {
|
||||
font-style:normal;
|
||||
font-weight:normal;
|
||||
}
|
||||
|
||||
li
|
||||
{
|
||||
list-style:none;
|
||||
}
|
||||
|
||||
caption, th
|
||||
{
|
||||
text-align:left;
|
||||
}
|
||||
|
||||
h1, h2, h3, h4, h5, h6
|
||||
{
|
||||
font-size:100%;
|
||||
font-weight:normal;
|
||||
}
|
||||
|
||||
q:before,
|
||||
q:after {
|
||||
content:'';
|
||||
}
|
||||
|
||||
abbr,
|
||||
acronym {
|
||||
border:0;
|
||||
font-variant:normal;
|
||||
}
|
||||
|
||||
/* to preserve line-height and selector appearance */
|
||||
sup
|
||||
{
|
||||
vertical-align:text-top;
|
||||
}
|
||||
|
||||
sub
|
||||
{
|
||||
vertical-align:text-bottom;
|
||||
}
|
||||
|
||||
input,
|
||||
textarea,
|
||||
select {
|
||||
font-family:inherit;
|
||||
font-size:inherit;
|
||||
font-weight:inherit;
|
||||
}
|
||||
|
||||
/*to enable resizing for IE*/
|
||||
input,
|
||||
textarea,
|
||||
select {
|
||||
*font-size:100%;
|
||||
}
|
||||
|
||||
/*because legend doesn't inherit in IE */
|
||||
legend {
|
||||
color:#000;
|
||||
}
|
Двоичные данные
addon/data/images/shortcut.png
Двоичные данные
addon/data/images/shortcut.png
Двоичный файл не отображается.
До Ширина: | Высота: | Размер: 804 B |
|
@ -1,27 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
|
||||
<title>Web Builder web-builder-flightdeck-prototype</title>
|
||||
<!-- <link href="images/shortcut.png" rel="shortcut icon" type="image/x-icon" /> -->
|
||||
|
||||
<!-- <link rel="stylesheet" type="text/css" href="css/reset.css" />
|
||||
<link rel="stylesheet" type="text/css" href="css/global.css"/> -->
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<h1>WEB BUILDER</h1>
|
||||
|
||||
</body>
|
||||
|
||||
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/mootools/1.4.1/mootools-yui-compressed.js"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
</script>
|
||||
|
||||
</html>
|
|
@ -1,39 +0,0 @@
|
|||
|
||||
var fluidText = new Class({
|
||||
|
||||
Implements: [Events, Options],
|
||||
|
||||
Binds: ['resize'],
|
||||
|
||||
options: {
|
||||
unit: 'px',
|
||||
font: { min: 9, max: 14 },
|
||||
size: { min: 400, max: 1000 },
|
||||
target: document.body,
|
||||
windowResize: true,
|
||||
getWidth: false
|
||||
},
|
||||
|
||||
initialize: function(element, options){
|
||||
this.setOptions(options);
|
||||
this.element = $(element);
|
||||
this.target = $(document.body);
|
||||
if(this.options.windowResize) window.addEvent('resize', this.resize);
|
||||
this.getWidth = (this.options.getWidth) ? this.options.getWidth.bind(this) : function(){ return this.element.getSize().x }.bind(this);
|
||||
this.resize();
|
||||
},
|
||||
|
||||
resize: function(){
|
||||
this.fireEvent('resize');
|
||||
var width = this.getWidth();
|
||||
if( width <= this.options.size.min ) this.target.setStyle('font-size', this.options.font.min + this.options.unit);
|
||||
else if( width >= this.options.size.max ) this.target.setStyle('font-size', this.options.font.max + this.options.unit);
|
||||
else {
|
||||
var increments = (this.options.size.max - this.options.size.min) / (this.options.font.max - this.options.font.min);
|
||||
this.target.setStyle('font-size',
|
||||
this.options.font.min + ((width - this.options.size.min) / increments).toInt() + (((width - this.options.size.min) % increments == 0) ? 0 : 1) + this.options.unit
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
});
|
Двоичный файл не отображается.
После Ширина: | Высота: | Размер: 1.1 KiB |
|
@ -1,7 +1,8 @@
|
|||
|
||||
|
||||
exports.main = function(options, callbacks) {
|
||||
var Window = require('window-utils'),
|
||||
Widget = require('widget'),
|
||||
Self = require('self'),
|
||||
Prefs = require('preferences-service'),
|
||||
windows = [],
|
||||
builders = [],
|
||||
|
@ -10,8 +11,18 @@ exports.main = function(options, callbacks) {
|
|||
|
||||
if (!Prefs.get(locationPref)) Prefs.set(locationPref, locationUrl);
|
||||
|
||||
require('widget').Widget({
|
||||
id: 'web-builder-widget',
|
||||
label: 'Web Builder',
|
||||
contentURL: Self.data.url('shortcut.png'),
|
||||
onClick: function(){
|
||||
builders.push(windows[0].open('about:blank', 'web-builder-chrome-window', 'width=600,height=600,resizable=yes,scrollbars=no,chrome=yes'));
|
||||
}
|
||||
});
|
||||
|
||||
new Window.WindowTracker({
|
||||
onTrack: function(window) {
|
||||
windows.push(window);
|
||||
|
||||
var document = window.document,
|
||||
builderIndex = builders.indexOf(window),
|
||||
|
@ -47,10 +58,11 @@ exports.main = function(options, callbacks) {
|
|||
onUntrack: function(window) {
|
||||
var document = window.document,
|
||||
index = windows.indexOf(window);
|
||||
if (index != -1){
|
||||
var menuItem = document.querySelector('#appmenu_webBuilder');
|
||||
menuItem.parentElement.removeChild(menuItem);
|
||||
}
|
||||
|
||||
windows.splice(window, 1);
|
||||
|
||||
var menuItem = document.querySelector('#appmenu_webBuilder');
|
||||
if (menuItem) menuItem.parentElement.removeChild(menuItem);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
Двоичные данные
addon/web-builder-bootstrap.xpi
Двоичные данные
addon/web-builder-bootstrap.xpi
Двоичный файл не отображается.
Загрузка…
Ссылка в новой задаче