Commit 79ac23a6 authored by Tristan Cavelier's avatar Tristan Cavelier Committed by Sebastien Robin

OfficeJS - Add: grunt tests, ICanHaz lib, light UI.

parent 9b2e03c8
body {
background: #fff !important;
width:100%;
height:100%;
margin: 0;
padding: 0;
font-family: arial,sans-serif;
display:inline-block;
font-weight:normal;
overflow-x: hidden;
}
/* buttons aspect */
.officejs_button {
background-image: url('../img/officejs/button_background.png');
border: 1px solid #BBBBBB;
border-radius: 4px 4px 4px 4px;
color: #333333;
}
/* widget fields */
fieldset.widget {
border: 0 none;
}
/* hide legends */
div.field label, span.headline, a.listbox_title, div.actions, div.actions,
legend.group_title, fieldset.left {
display: none;
}
/* Hidden input */
fieldset#hidden_fieldset,
div#upload_document,
div#edit_document {
display: none;
}
/* navigation classes */
div.navigation {
border-bottom: 1px solid #C9D7F1;
font-family: arial,sans-serif;
font-size: 13px;
height: 15px;
padding: 5px;
}
div.navigation fieldset.widget {
border: 0px;
padding-top: 0.6%;
margin: -0.60%;
width: 96%;
}
/* left */
div.navigation-left a {
margin-left:7px;
}
/* right */
div.navigation-right {
float: right;
margin-top: -16px;
}
div.navigation-right a {
margin-left: 2px;
}
div.navigation-right fieldset.widget div {
float: left;
}
/* language selection */
div#select_language {
font-family: arial,sans-serif;
font-size: 14px;
list-style: none outside none;
white-space: nowrap;
}
div#select_language {
color: #2200CC;
}
div#select_language ul li span {
cursor: pointer;
}
span#available_language {
text-decoration: underline;
}
div#select_language ul li ul {
display: none;
height: auto;
position: absolute;
z-index: 200;
width: 70px;
}
div#select_language ul {
list-style: none outside none;
background-color: white;
margin: 0;
padding: 0;
}
div#select_language ul li li {
background: none repeat scroll 0 0 #FFFFFF;
border-left: 1px solid #C9D7F1;
border-right: 1px solid #C9D7F1;
}
div#select_language ul li span {
cursor: pointer;
header {
background-color: #DDDDFF;
height: 50px;
padding-left: 30px;
padding-right: 30px;
}
div#select_language ul li:hover ul {
display: block;
}
div#select_language ul li li:hover {
background-color: #DAE6F6;
}
/* other options */
a#left_message, a#right_message {
color: #FD0A0A;
display: none;
}
/* header */
div.header {
height: 3.5em;
width: 100%;
}
div#wrapper_header {
width: 100%;
height: 100%;
display: inline-block;
}
/* left */
div.header-left {
margin-top: -4px;
width: 32em;
position: absolute;
}
div.header-left h2 {
font-size: 14pt;
}
/* logo OFFICEJS */
a#loading_message {
display: none;
}
div.logo-area {
float: left;
padding-right: 10px;
}
a.officejs_docs img {
border:0 none;
position:relative;
top:9px;
}
/* document title & state */
div#wrapper_header div.field a[name="document_title"] {
color: #060605;
padding-left: 1em;
padding-right: 1em;
text-decoration: none;
}
div#wrapper_header div.field a[name="document_title"], div#wrapper_header div.field a[name="document_state"] {
font-size: 15px;
margin-left: 22px;
}
div#wrapper_header div.field a[name="document_title"]:hover {
background: none repeat scroll 0 0 #FFFFD6;
border: 1px solid #AAAAAA;
}
/* research bar */
div.input form {
margin-top: 0.5em;
float:right;
}
/* right */
div.header-right{
margin-right: 10em;
position: relative;
aside {
float: right;
}
div.header-right fieldset.widget {
padding: 0;
}
/* last modification & author */
div.header-right div.input {
margin-top: 1em;
}
div.header-right div.input div{
float: right;
position: relative;
}
div.header-right div.input a {
color: #A7A2A2;
font-size: 13px;
}
.action_menu {
float:right;
position: absolute;
margin-left: 3em;
z-index: 200;
}
.action_menu ul {
padding: 0;
}
.action_menu ul li {
list-style: none inside none;
}
.action_menu a#change_state {
background-image: url("../img/officejs/button_background.png");
border: 1px solid #D1D1D1;
color: #333333;
padding: 2px;
}
.action_menu ul#change_state_list>li:hover {
color: #000000;
text-decoration: none;
cursor:pointer;
margin-right: -3em;
}
.action_menu li:hover ul {
display: block;
}
.action_menu ul li ul {
background: none repeat scroll 0 0 #FFFFFF;
border: 1px solid #D1D1D1;
display: none;
}
.action_menu ul li ul:hover {
display: block;
}
.action_menu ul li ul li:hover {
background: none repeat scroll 0 0 #F3F3F3;
}
.action_menu ul li ul li {
text-align: center;
}
.action_menu ul li ul li h6 {
color: #333333;
font-size: 12px;
font-weight: lighter;
padding: 0.5em;
margin: 0;
}
/* main */
div.main {
height: auto;
margin-top: 0.5em;
}
/***************** OFFICEJS main page ********************/
/* left */
div.main-left {
border-right: 4px solid #BBCCFF;
background-color: #DAE6F6;
height: 100%;
margin-left: -4px;
width: 12em;
margin-top: -0.6em;
overflow:auto;
float:left;
}
div.gadget-column {
margin-left: -4px;
margin-right: -8px;
}
/* listbox menus */
.option_menu {
font-family: arial,sans-serif;
font-size: 14px;
list-style: none outside none;
white-space: nowrap;
color: #8E8E8E;
margin-top: -5px;
margin-left: 5px;
float:left;
}
.option_menu li {
padding-top: 0.5em;
position: relative;
text-decoration: none;
}
.option_menu li div {
display: block;
text-decoration: none;
}
.option_menu li div.fix {
height: 19px;
padding-left: 2px;
padding-right: 14px;
text-align: justify;
width: 78px;
}
.option_menu li div.fix img {
margin-left: 3px;
position: relative;
top: 2px;
}
.option_menu img {
border: 0 none;
}
.option_menu li:hover ul {
display: block;
}
.option_menu li ul {
display: none;
height: auto;
position: absolute;
z-index: 200;
background-color: #FFFFFF;
border: 1px solid #D1D1D1;
}
.option_menu li li:hover {
background-color: #DAE6F6;
}
.option_menu ul {
nav#header_navbar li {
display: inline;
list-style: none outside none;
margin: 0;
padding: 0;
}
.option_menu li div:hover {
color: #000000;
text-decoration: none;
cursor: pointer;
}
.option_menu li ul div {
color: #002E3F;
display: block;
font-size: 14px;
font-style: normal;
line-height: 28px;
margin-left: 4px;
margin-top: -5px;
padding: 0 21px 0 1px;
text-align: left;
text-decoration: none;
}
/* upload button */
div.gadget-action input#upload {
left: 0.5em;
position: relative;
top: 0.1em;
}
/* action list */
div.gadget-column div.file-selection {
background-color: #FFFFFF;
margin: 0.5em -4px -4px;
}
div.gadget-column div.file-selection div.file-quick-browser,
div.gadget-column div.file-selection div.file-quick-search {
border-bottom: 1px solid #DDDDDD;
padding-bottom: 5px;
padding-top: 5px;
width: 100%;
}
div.listbox-tree {
font-size: 13px;
height: 233px;
overflow: hidden;
width: 100%;
}
div.listbox-domain-tree-container select {
display: none;
}
.tree-open, .tree-closed {
background: none repeat scroll 0 0 #FFFFFF;
border: medium none;
cursor: pointer;
margin-left: 1em;
margin-left: 30px;
}
/* gadgets */
/* right */
div.main-right {
height: 100%;
margin-top: -0.6em;
float:right;
margin-left: -3px;
}
div.main-right fieldset.widget {
margin-top: 5px;
padding: 0;
margin-left: -1px;
}
/* buttons delete, refresh, change state */
div.toolbar, div.favorite {
border-collapse: collapse;
}
div.favorite {
background-color: #BBCCFF;
height: 27px;
margin-top: -5px;
padding-top: 8px;
}
div.toolbar {
background-color: #E3E9FF;
height: 27px;
padding-bottom: 5px;
}
div.favorite a {
float: right;
font-size: 14px;
margin-right: 5px;
}
a.domain_selected {
float: left !important;
font-size: 15px !important;
}
button.delete {
margin-left: 6px;
margin-top: 6px;
}
/* navigation buttons */
div.listbox-navigation {
float: right;
font-size: 13px;
margin-right: 5px;
margin-top: 0;
min-width: 10%;
display: none;
}
div.listbox-navigation input {
margin-top: 0.3em;
height: 18px;
width: 20px;
}
div.listbox-navigation button.listbox_first_page {
background-image: url("../img/officejs/first_page.png");
}
div.listbox-navigation button.listbox_previous_page {
background-image: url("../img/officejs/previous_page.png");
}
div.listbox-navigation button.listbox_next_page {
background-image: url("../img/officejs/next_page.png");
}
div.listbox-navigation button.listbox_last_page {
background-image: url("../img/officejs/last_page.png");
nav#left_navbar {
background-color: #DDDDDD;
display: inline-block;
width: 15%;
}
div.listbox-navigation button.listbox_previous_page, div.listbox-navigation button.listbox_next_page {
section {
display: inline-block;
margin: 0;
width: 12px;
}
div.listbox-navigation button {
position: relative;
top: -0.2em;
background-repeat: no-repeat;
border: 0 none;
height: 20px;
display: none;
}
div.listbox-navigation button:hover {
cursor: pointer;
}
/* header */
div.listbox-header-box {
height: 0;
}
div.listbox-content a, a:visited, a:focus {
background-color: inherit;
color: #002E3F;
text-decoration: none;
}
div.listbox-content a:hover {
background-color: inherit;
color: #3D6474;
text-decoration: underline;
}
a.your_listbox_title {
display: none;
}
/* records displayer */
div.listbox-header-box {
height: 0;
float: right;
}
div.listbox-number-of-records {
float: right;
font-size: 12px;
margin-right: 5em;
margin-top: -18px;
min-width: 30%;
}
/* document list */
/* headlines */
table.listbox {
background: none repeat scroll 0 0 #EFF3FA;
}
.listbox {
border-collapse: collapse;
}
thead {
background: url("../img/officejs/href_background.gif") repeat scroll 0 0 transparent;
font-family: serif;
font-size: medium;
font-style: normal;
font-variant: normal;
font-weight: normal;
letter-spacing: normal;
line-height: 100%;
word-spacing: normal;
}
div.listbox-content tr {
border-bottom: 1px solid #D1D1D1;
empty-cells: show;
font-size: 13px;
padding-top: 1px;
white-space: nowrap;
}
.listbox th {
border-right: 1px solid #BBCCFF;
}
.listbox-table-select-cell {
width: 0.5%;
}
.listbox-table-header-cell {
text-align: left;
}
.sort-button {
background: url("../img/officejs/href_background.gif") repeat scroll 0 0 transparent;
border: 0 none;
}
.sort-button span {
color: #112ABB;
}
/* document line */
tr.text:hover, tr.illustration:hover, tr.table:hover {/*editable document*/
background-color: #DAE6F6;
}
tr.other td.listbox-table-data-cell a {/*uneditable document*/
color: #8E8E8E;
text-decoration: none !important;
}
div.listbox-content tr {
border-bottom: 1px solid #D1D1D1;
empty-cells: show;
font-size: 13px;
padding-top: 1px;
white-space: nowrap;
}
div.listbox-content table.listbox tbody tr td {
padding: 2.2px;
vertical-align: middle;
}
div.listbox-content a:hover {
background-color: inherit;
color: #3D6474;
text-decoration: underline;
}
div.listbox-content td.listbox-table-data-cell {
cursor: pointer;
}
div.listbox-content td.listbox-table-data-cell a img {
margin-right: -8px;
}
div.listbox-content a img, div.main-content a img {
border: 0 none;
}
/**********************************************************
******************* editor page ***********************/
/* content */
div.content {
/*background: none repeat scroll 0 0 #DAE6F6;*/
width:100%;
border-bottom: 4px solid #BBCCFF;
border-top: 4px solid #BBCCFF;
}
fieldset.bottom {
border: 0 none;
width:100%;
list-style: none outside none;
padding: 0;
position: relative;
}
/* SVG-edit */
iframe#svgframe {
width: 100%;
border: 0 none;
overflow: hidden;
}
/**********************************************************
******************* login page ************************/
/* welcome message */
div#advertisement b {
font-size: 12px;
}
div#advertisement img{
position: absolute;
margin-top: 3em;
height: 10em;
}
/* login table */
span#id_provider_details {
font-size: 8px;
float: left;
}
table#field_table, table#new-account-table, table#create-new-user {
border: 1px solid #C3D9FF;
width: 78%;
}
table#field_table tbody, table#new-account-table tbody, table#create-new-user tbody {
background: none repeat scroll 0 0 #E8EEFA;
}
table#field_table tbody label {
float: right;
font-size: 10pt;
white-space: nowrap;
}
/* new user table */
table#create-new-user {
display: none;
margin-top: -22px;
}
table#new-account-table table td, table#create-new-user td {
font-size: 10pt;
}
td#form-message {
color: #EC1D1D;
display: none;
}
form#create-user table tbody tr:last-child td a{
color: #2200CC;
cursor: pointer;
font-size: 8pt;
text-decoration: underline;
}
/* new account "button" */
td#new-account-form {
color: #0000CC;
cursor: pointer;
font-weight: bold;
text-decoration: underline;
}
/* footer */
div.footer {
font-size: 10pt;
margin-top: 40px;
text-align: center;
}
div.footer a {
margin-left: 0.5em;
margin-right: 0.5em;
}
/**********************************************************
******************** tooltip area *********************/
span.tooltipElement {
cursor: pointer;
color: #0099CC;
}
div.toolLocation{
visibility: hidden;
position: absolute;
border-radius: 10px 10px 10px 10px;
border: 1px solid Black;
padding: 10px;
font-family: Verdana, Arial;
font-size: 10px;
background-color: #FFFFCC;
}
/**********************************************************
******************* dialog box ************************/
div.ui-dialog {
background: none repeat scroll 0 0 #C1D9FF;
}
fieldset#edit_document {
border: 0 none;
height: 72px;
margin-left: -1em;
margin-top: -0.5em;
width: 379px;
}
div.ui-dialog-titlebar {
background: none repeat scroll 0 0 #E0EDFE;
border: 0 none;
border-radius: 1px 1px 1px 1px;
height: 15px;
}
span#ui-dialog-title-edit_document, span#ui-dialog-title-upload_document, span#ui-dialog-title-gadget-listbox {
color: #222222 !important;
font: bold 12pt Arial,Sans-serif;
margin-left: -8px;
margin-top: -3px;
}
div#edit_document.ui-dialog-content {
background-color: #FFFFFF;
}
div#edit_document {
height: 80px;
overflow: hidden;
width: 368px;
}
.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset {
float: none !important;
height: 21px;
margin-top: -10px;
width: 104px;
}
.ui-dialog .ui-dialog-buttonpane button {
margin: 0 0.4em 0.5em 0 !important;
}
.ui-button .ui-button-text {
line-height: 1em !important;
}
.ui-button-text-only .ui-button-text {
padding: 0.2em 0.3em !important;
}
span.ui-button-text {
font-size: 12px;
vertical-align: top;
}
/*global module:false*/
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
pkg: '<json:package.json>',
meta: {
banner: '/*! <%= pkg.title || pkg.name %> - v<%= pkg.version %> - '+
'<%= grunt.template.today("yyyy-mm-dd") %>\n' +
'<%= pkg.homepage ? "* " + pkg.homepage + "\n" : "" %>' +
'* Copyright (c) <%= grunt.template.today("yyyy") %> Nexedi;' +
' Licensed <%= _.pluck(pkg.licenses, "type").join(", ") %> */'
},
concat: {
dist: {
src: ['<banner:meta.banner>',
'<file_strip_banner:../../src/<%= pkg.name %>.js>'],
dest: '../../lib/jio/<%= pkg.name %>.js'
}
},
min: {
dist: {
src: ['<banner:meta.banner>', '<config:concat.dist.dest>'],
dest: '../../lib/jio/<%= pkg.name %>.min.js'
}
},
qunit: {
files: []
},
lint: {
files: ['grunt.js','../../script/**/*.js']
},
watch: {
files: '<config:lint.files>',
tasks: 'lint'
},
jshint: {
options: {
curly: true,
eqeqeq: true,
immed: true,
latedef: true,
newcap: true,
noarg: true,
sub: true,
undef: true,
boss: true,
eqnull: true,
browser: true
},
globals: {
jQuery: true,
LocalOrCookieStorage: true,
Base64: true,
JIO: true,
console: true,
unescape: true,
// Needed to avoid "not defined error" with requireJs
define: true,
require: true,
// Needed to avoid "not defined error" with sinonJs
sinon: true,
module: true,
test: true,
ok: true,
deepEqual: true,
expect: true,
stop: true,
start: true,
equal: true
}
},
uglify: {}
});
// Default task.
grunt.registerTask('default', 'lint');
};
{
"name": "officejs",
"title": "OfficeJS",
"description": "The Free HTML5 Cloud Office",
"version": "0.1.0",
"homepage": "",
"author": {
"name": "Tristan Cavelier",
"email": "tristan.cavelier@tiolive.com"
},
"repository": {
"type": "git",
"url": "http://git.erp5.org/repos/ung.git"
},
"bugs": {
"url": ""
},
"licenses": [
],
"dependencies": {
"jquery": "~1.7",
"require": "1.0.8"
},
"keywords": []
}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<litk rel="icon" href="img/officejs/favicon.png" />
<link rel="shortcut icon" href="img/officejs/favicon.png" />
<link rel="stylesheet" href="css/officejs.css" />
<title>OfficeJS</title>
<!-- js scripts -->
<script type="text/javascript" src="lib/icanhaz/ICanHaz.min.js"></script>
<script data-main="script/loader"
type="text/javascript"
src="lib/require/require.js"></script>
<!-- html scripts -->
<script id="test" type="text/html">
<article>
<p>
test
</p>
</article>
</script>
</head>
<body>
<header>
<aside>
<nav id="header_navbar">
<ul class="nav">
<li><a href="#">Nav</a></li>
<li><a href="#about">About</a></li>
<li><a href="#contact">Contact</a></li>
</ul>
</nav>
</aside>
<h1>OfficeJS</h1>
</header>
<nav id="left_navbar">
<ul class="nav">
<li class="nav-header">Documents</li>
<li class="create_document"><a href="#/create_document">Create Document</a></li>
<li><a href="#/test">Test</a></li>
<li class="other">Other</li>
</ul>
</nav>
<section id="main">
<!-- Body content -->
</section>
</body>
</html>
(function(){var q=function(){function c(a){return(""+a).replace(/&(?!\w+;)|[<>"']/g,function(a){return k[a]||a})}var e=Object.prototype.toString;Array.isArray=Array.isArray||function(a){return"[object Array]"==e.call(a)};var i=String.prototype.trim,g;if(i)g=function(a){return null==a?"":i.call(a)};else{var h,m;/\S/.test("\u00a0")?(h=/^[\s\xA0]+/,m=/[\s\xA0]+$/):(h=/^\s+/,m=/\s+$/);g=function(a){return null==a?"":a.toString().replace(h,"").replace(m,"")}}var k={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;",
"'":"&#39;"},o={},p=function(){};p.prototype={otag:"{{",ctag:"}}",pragmas:{},buffer:[],pragmas_implemented:{"IMPLICIT-ITERATOR":!0},context:{},render:function(a,d,b,f){if(!f)this.context=d,this.buffer=[];if(this.includes("",a)){var a=this.render_pragmas(a),j=this.render_section(a,d,b);!1===j&&(j=this.render_tags(a,d,b,f));if(f)return j;this.sendLines(j)}else{if(f)return a;this.send(a)}},send:function(a){""!==a&&this.buffer.push(a)},sendLines:function(a){if(a)for(var a=a.split("\n"),d=0;d<a.length;d++)this.send(a[d])},
render_pragmas:function(a){if(!this.includes("%",a))return a;var d=this,b=this.getCachedRegex("render_pragmas",function(a,d){return RegExp(a+"%([\\w-]+) ?([\\w]+=[\\w]+)?"+d,"g")});return a.replace(b,function(a,b,e){if(!d.pragmas_implemented[b])throw{message:"This implementation of mustache doesn't understand the '"+b+"' pragma"};d.pragmas[b]={};e&&(a=e.split("="),d.pragmas[b][a[0]]=a[1]);return""})},render_partial:function(a,d,b){a=g(a);if(!b||void 0===b[a])throw{message:"unknown_partial '"+a+"'"};
return!d||"object"!=typeof d[a]?this.render(b[a],d,b,!0):this.render(b[a],d[a],b,!0)},render_section:function(a,d,b){if(!this.includes("#",a)&&!this.includes("^",a))return!1;var f=this,j=this.getCachedRegex("render_section",function(a,b){return RegExp("^([\\s\\S]*?)"+a+"(\\^|\\#)\\s*(.+)\\s*"+b+"\n*([\\s\\S]*?)"+a+"\\/\\s*\\3\\s*"+b+"\\s*([\\s\\S]*)$","g")});return a.replace(j,function(a,j,e,c,g,h){var a=j?f.render_tags(j,d,b,!0):"",h=h?f.render(h,d,b,!0):"",n,c=f.find(c,d);"^"===e?n=!c||Array.isArray(c)&&
0===c.length?f.render(g,d,b,!0):"":"#"===e&&(n=Array.isArray(c)?f.map(c,function(a){return f.render(g,f.create_context(a),b,!0)}).join(""):f.is_object(c)?f.render(g,f.create_context(c),b,!0):"function"==typeof c?c.call(d,g,function(a){return f.render(a,d,b,!0)}):c?f.render(g,d,b,!0):"");return a+n+h})},render_tags:function(a,d,b,f){for(var j=this,e=function(){return j.getCachedRegex("render_tags",function(a,b){return RegExp(a+"(=|!|>|&|\\{|%)?([^#\\^]+?)\\1?"+b+"+","g")})},g=e(),h=function(a,f,h){switch(f){case "!":return"";
case "=":return j.set_delimiters(h),g=e(),"";case ">":return j.render_partial(h,d,b);case "{":case "&":return j.find(h,d);default:return c(j.find(h,d))}},a=a.split("\n"),i=0;i<a.length;i++)a[i]=a[i].replace(g,h,this),f||this.send(a[i]);if(f)return a.join("\n")},set_delimiters:function(a){a=a.split(" ");this.otag=this.escape_regex(a[0]);this.ctag=this.escape_regex(a[1])},escape_regex:function(a){if(!arguments.callee.sRE)arguments.callee.sRE=RegExp("(\\/|\\.|\\*|\\+|\\?|\\||\\(|\\)|\\[|\\]|\\{|\\}|\\\\)",
"g");return a.replace(arguments.callee.sRE,"\\$1")},find:function(a,d){function b(a){return!1===a||0===a||a}var a=g(a),f;if(a.match(/([a-z_]+)\./ig)){var c=this.walk_context(a,d);b(c)&&(f=c)}else b(d[a])?f=d[a]:b(this.context[a])&&(f=this.context[a]);return"function"==typeof f?f.apply(d):void 0!==f?f:""},walk_context:function(a,d){for(var b=a.split("."),f=void 0!=d[b[0]]?d:this.context,c=f[b.shift()];void 0!=c&&0<b.length;)f=c,c=c[b.shift()];return"function"==typeof c?c.apply(f):c},includes:function(a,
d){return-1!=d.indexOf(this.otag+a)},create_context:function(a){if(this.is_object(a))return a;var d=".";if(this.pragmas["IMPLICIT-ITERATOR"])d=this.pragmas["IMPLICIT-ITERATOR"].iterator;var b={};b[d]=a;return b},is_object:function(a){return a&&"object"==typeof a},map:function(a,d){if("function"==typeof a.map)return a.map(d);for(var b=[],c=a.length,e=0;e<c;e++)b.push(d(a[e]));return b},getCachedRegex:function(a,d){var b=o[this.otag];b||(b=o[this.otag]={});var c=b[this.ctag];c||(c=b[this.ctag]={});
(b=c[a])||(b=c[a]=d(this.otag,this.ctag));return b}};return{name:"mustache.js",version:"0.4.0",to_html:function(a,c,b,f){var e=new p;if(f)e.send=f;e.render(a,c||{},b);if(!f)return e.buffer.join("\n")}}}();(function(){var c={VERSION:"0.10",templates:{},$:"undefined"!==typeof window?window.jQuery||window.Zepto||null:null,addTemplate:function(e,i){if("object"===typeof e)for(var g in e)this.addTemplate(g,e[g]);else c[e]?console.error("Invalid name: "+e+"."):c.templates[e]?console.error('Template "'+e+
' " exists'):(c.templates[e]=i,c[e]=function(g,i){var g=g||{},k=q.to_html(c.templates[e],g,c.templates);return c.$&&!i?c.$(k):k})},clearAll:function(){for(var e in c.templates)delete c[e];c.templates={}},refresh:function(){c.clearAll();c.grabTemplates()},grabTemplates:function(){var e,i=document.getElementsByTagName("script"),g,h=[];for(e=0,l=i.length;e<l;e++)if((g=i[e])&&g.innerHTML&&g.id&&("text/html"===g.type||"text/x-icanhaz"===g.type))c.addTemplate(g.id,"".trim?g.innerHTML.trim():g.innerHTML.replace(/^\s+/,
"").replace(/\s+$/,"")),h.unshift(g);for(e=0,l=h.length;e<l;e++)h[e].parentNode.removeChild(h[e])}};"undefined"!==typeof require?module.exports=c:window.ich=c;"undefined"!==typeof document&&(c.$?c.$(function(){c.grabTemplates()}):document.addEventListener("DOMContentLoaded",function(){c.grabTemplates()},!0))})()})();
<!DOCTYPE html>
<html lang="en">
<head>
<meta name="generator" content=
"HTML Tidy for Linux/x86 (vers 11 February 2007), see www.w3.org" />
<meta name="generator" content=
"ERP5 - Copyright (C) 2001 - 2008. All rights reserved." />
<meta name="description" content="ERP5 Free Open Source ERP and CRM" />
<meta name="keywords" content="" />
<meta name="robots" content="index, follow" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Script-Type" content="text/javascript" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<title>Office JS</title>
<link type="text/css" rel="stylesheet" href="css/jquery-ui.css" />
<link type="text/css" rel="stylesheet" href="css/officejs.css" />
<link rel="icon" type="image/x-icon" href="img/officejs/favicon.ico" />
<link rel="shortcut icon"
type="image/x-icon" href="img/officejs/favicon.ico" />
<!-- dependencies: jquery sjcl base64 jio tools theme officejs login -->
<script data-main="scripts/login/loader" src="libs/require/require.js">
</script>
</head>
<body>
<div class="container">
<div class="navigation" style="display:none">
<!-- Each aggregate of groups is a div wrapper -->
<div class="wrapper" id="wrapper_navigation">
<div class=" navigation-right">
<fieldset class="widget">
<div class="field" title="">
<label>your_language</label>
<div class="input">
<div>
<div id="select_language">
<!-- todo : interface to change the language -->
</div>
</div>
</div>
</div>
</fieldset>
</div>
</div>
</div>
<div class="main">
<!-- Each aggregate of groups is a div wrapper -->
<div class="wrapper" id="wrapper_main">
<div class="content">
<fieldset class="widget">
<h2>Welcome to OfficeJS</h2>
<div id="main-content">
<table width="100%" cellspacing="0" cellpadding="0" border="0">
<tbody>
<tr>
<td valign="top">
<div id="advertisement">
<b>Sign in to edit documents, spreadsheets and drawing and share this document with other users</b><br />
<img src="img/officejs/logo.png" alt="" />
</div>
</td>
<td>
<table id="field_table" style="display: table; width: 78%;">
<tbody>
<tr>
<td align="center">
<table>
<tbody>
<tr>
<td align="center" colspan="2"><font size="-1">Login in</font></td>
</tr>
<tr>
<td></td>
</tr>
<tr>
<td align="center"><label for="name">Name</label></td>
<td align="center"><input id="name" type="text" value="" name="name" /></td>
</tr>
<tr>
<td align="center"><label for="storage_location">Storage Location
<span class="tooltipElement" onmouseover="tooltip.show('please, indicate the storage server&lt;br/&gt;where your data will be stored&lt;br/&gt;let free to store on your computer')">(?)</span></label></td>
<td><input id="storage_location" type="text" value="" name="storage_location" /></td>
</tr>
<tr>
<td align="center" colspan="2"><input class="submit" onclick="logUser()" type="button" value="Login" name="logged_in:method" /></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td><br /></td>
<td>
<table id="create-new-user" style="width: 78%; display: none;">
<tbody>
<tr>
<td>
<form id="create-user" action="javascript:createNewUser()" method="post" name="create-user">
<table width="100%">
<tbody>
<tr>
<td align="center" colspan="2"><b>Create an account</b></td>
</tr>
<tr>
<td id="form-message" align="center" colspan="2"></td>
</tr>
<tr>
<td>First Name</td>
<td><input type="text" name="firstname" /></td>
</tr>
<tr>
<td>Last Name</td>
<td><input type="text" name="lastname" /></td>
</tr>
<tr>
<td>Email</td>
<td><input type="text" name="email" /></td>
</tr>
<tr>
<td>Login name</td>
<td><input type="text" name="login_name" /></td>
</tr>
<tr>
<td>Password</td>
<td><input type="password" name="password" /></td>
</tr>
<tr>
<td>Confirm Password</td>
<td><input type="password" name="confirm" /></td>
</tr>
<tr>
<td align="center" colspan="2"><input class="submit" type="submit" value="Create Account" name="logged_in:method" /></td>
</tr>
<tr>
<td id="back-login" align="left" colspan="2"><a onclick="displayNewAccountForm(false)">&lt;&lt;Back</a></td>
</tr>
</tbody>
</table>
</form>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td></td>
</tr>
<tr>
<td></td>
<td>
<table id="new-account-table" style="display: table; width: 78%;">
<tbody>
<tr>
<td>
<table width="100%">
<tbody>
<tr>
<td align="center" colspan="2"><b>Don't have an <span class="tooltipElement" onmouseover="tooltip.show('register to store your data&lt;br/&gt;on our server&lt;br/&gt;(not implemented yet)')">OfficeJS Account</span> ?</b></td>
</tr>
<tr>
<td id="new-account-form" align="center" colspan="2"
onclick="displayNewAccountForm(true)">Create an
account now</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</div>
<div class="footer">
<a href="http://www.freecloudalliance.org/">Free Cloud Alliance</a> - <a href="#">Help</a>
</div>
</fieldset>
</div>
</div>
</div>
</div>
<div id="page_bottom"></div>
<div class="toolLocation"></div>
</body>
</html>
require.config ({
paths: {
LocalOrCookieStorage: '../lib/jio/localorcookiestorage.min',
jQueryAPI: '../lib/jquery/jquery',
jQuery: '../lib/jio/jquery.requirejs_module',
JIO: '../src/jio',
Base64API: '../lib/base64/base64',
Base64: '../lib/jio/base64.requirejs_module',
JIOStorages: '../lib/jio/jio.storage.min',
OfficeJS: '../script/officejs'
}
});
require(['OfficeJS'],function (OJS) {
var JIO = OJS.JIO,
$ = OJS.jQuery,
Base64 = OJS.Base64,
ich = OJS.ich;
$('#main').html(ich['test']({},true));
});
define ('OfficeJS',
['LocalOrCookieStorage',
'jQuery',
'JIO',
'Base64',
'JIOStorages'],
function (LocalOrCookieStorage,
jQuery,
JIO,
Base64) {
return {LocalOrCookieStorage: LocalOrCookieStorage,
jQuery: jQuery,
JIO: JIO,
Base64: Base64,
ich: window.ich};
});
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment