X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/f5240829880f87e0cf581c6a296e436fdef0ef80..6746dc89c47ed01b165cc1152533605f97eb8e8d:/examples/shared/examples.js diff --git a/examples/shared/examples.js b/examples/shared/examples.js index b11fd775..e33def19 100644 --- a/examples/shared/examples.js +++ b/examples/shared/examples.js @@ -1,62 +1,78 @@ -/*! - * Ext JS Library 3.3.0 - * Copyright(c) 2006-2010 Ext JS, Inc. - * licensing@extjs.com - * http://www.extjs.com/license - */ -Ext.BLANK_IMAGE_URL = '../../resources/images/default/s.gif'; +/* +This file is part of Ext JS 4 + +Copyright (c) 2011 Sencha Inc + +Contact: http://www.sencha.com/contact + +GNU General Public License Usage +This file may be used under the terms of the GNU General Public License version 3.0 as published by the Free Software Foundation and appearing in the file LICENSE included in the packaging of this file. Please review the following information to ensure the GNU General Public License version 3.0 requirements will be met: http://www.gnu.org/copyleft/gpl.html. + +If you are unsure which license is appropriate for your use, please contact the sales department at http://www.sencha.com/contact. + +*/ Ext.example = function(){ var msgCt; function createBox(t, s){ - return ['
', - '
', - '

', t, '

', s, '
', - '
', - '
'].join(''); + // return ['
', + // '
', + // '

', t, '

', s, '
', + // '
', + // '
'].join(''); + return '

' + t + '

' + s + '

'; } return { msg : function(title, format){ if(!msgCt){ - msgCt = Ext.DomHelper.insertFirst(document.body, {id:'msg-div'}, true); + msgCt = Ext.core.DomHelper.insertFirst(document.body, {id:'msg-div'}, true); } - msgCt.alignTo(document, 't-t'); - var s = String.format.apply(String, Array.prototype.slice.call(arguments, 1)); - var m = Ext.DomHelper.append(msgCt, {html:createBox(title, s)}, true); - m.slideIn('t').pause(1).ghost("t", {remove:true}); + var s = Ext.String.format.apply(String, Array.prototype.slice.call(arguments, 1)); + var m = Ext.core.DomHelper.append(msgCt, createBox(title, s), true); + m.hide(); + m.slideIn('t').ghost("t", { delay: 1000, remove: true}); }, init : function(){ - /* - var t = Ext.get('exttheme'); - if(!t){ // run locally? - return; - } - var theme = Cookies.get('exttheme') || 'aero'; - if(theme){ - t.dom.value = theme; - Ext.getBody().addClass('x-'+theme); - } - t.on('change', function(){ - Cookies.set('exttheme', t.getValue()); - setTimeout(function(){ - window.location.reload(); - }, 250); - });*/ - - var lb = Ext.get('lib-bar'); - if(lb){ - lb.show(); - } +// var t = Ext.get('exttheme'); +// if(!t){ // run locally? +// return; +// } +// var theme = Cookies.get('exttheme') || 'aero'; +// if(theme){ +// t.dom.value = theme; +// Ext.getBody().addClass('x-'+theme); +// } +// t.on('change', function(){ +// Cookies.set('exttheme', t.getValue()); +// setTimeout(function(){ +// window.location.reload(); +// }, 250); +// }); +// +// var lb = Ext.get('lib-bar'); +// if(lb){ +// lb.show(); +// } } }; }(); -Ext.example.shortBogusMarkup = '

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed metus nibh, sodales a, porta at, vulputate eget, dui. Pellentesque ut nisl. Maecenas tortor turpis, interdum non, sodales non, iaculis ac, lacus. Vestibulum auctor, tortor quis iaculis malesuada, libero lectus bibendum purus, sit amet tincidunt quam turpis vel lacus. In pellentesque nisl non sem. Suspendisse nunc sem, pretium eget, cursus a, fringilla vel, urna.'; -Ext.example.bogusMarkup = '

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed metus nibh, sodales a, porta at, vulputate eget, dui. Pellentesque ut nisl. Maecenas tortor turpis, interdum non, sodales non, iaculis ac, lacus. Vestibulum auctor, tortor quis iaculis malesuada, libero lectus bibendum purus, sit amet tincidunt quam turpis vel lacus. In pellentesque nisl non sem. Suspendisse nunc sem, pretium eget, cursus a, fringilla vel, urna.

Aliquam commodo ullamcorper erat. Nullam vel justo in neque porttitor laoreet. Aenean lacus dui, consequat eu, adipiscing eget, nonummy non, nisi. Morbi nunc est, dignissim non, ornare sed, luctus eu, massa. Vivamus eget quam. Vivamus tincidunt diam nec urna. Curabitur velit.

'; +Ext.example.shortBogusMarkup = '

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed metus nibh, '+ + 'sodales a, porta at, vulputate eget, dui. Pellentesque ut nisl. Maecenas tortor turpis, interdum non, sodales '+ + 'non, iaculis ac, lacus. Vestibulum auctor, tortor quis iaculis malesuada, libero lectus bibendum purus, sit amet '+ + 'tincidunt quam turpis vel lacus. In pellentesque nisl non sem. Suspendisse nunc sem, pretium eget, cursus a, fringilla.

'; -Ext.onReady(Ext.example.init, Ext.example); +Ext.example.bogusMarkup = '

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed metus nibh, sodales a, '+ + 'porta at, vulputate eget, dui. Pellentesque ut nisl. Maecenas tortor turpis, interdum non, sodales non, iaculis ac, '+ + 'lacus. Vestibulum auctor, tortor quis iaculis malesuada, libero lectus bibendum purus, sit amet tincidunt quam turpis '+ + 'vel lacus. In pellentesque nisl non sem. Suspendisse nunc sem, pretium eget, cursus a, fringilla vel, urna.

'+ + 'Aliquam commodo ullamcorper erat. Nullam vel justo in neque porttitor laoreet. Aenean lacus dui, consequat eu, adipiscing '+ + 'eget, nonummy non, nisi. Morbi nunc est, dignissim non, ornare sed, luctus eu, massa. Vivamus eget quam. Vivamus tincidunt '+ + 'diam nec urna. Curabitur velit. Lorem ipsum dolor sit amet.

'; + +//Ext.onReady(Ext.example.init, Ext.example); // old school cookie functions @@ -105,4 +121,4 @@ Cookies.getCookieVal = function(offset){ endstr = document.cookie.length; } return unescape(document.cookie.substring(offset, endstr)); -}; \ No newline at end of file +};