code
stringlengths
1
2.08M
language
stringclasses
1 value
$(function() { $team_sel = $("select[name=team_sel]"); $team_sel.change(function() { if ($team_sel.find("option:selected").val() === '1') { $("#sel_oday").attr("checked", true); } else { $("#sel_oday").attr("checked", false); } return true; }); editPr(); editPos(); $('#reason-type').change(function() { var reasonDetail=$('#reason-detail'); var val=parseInt(this.value); if(val===0) { reasonDetail.fadeOut().removeClass('required'); } else { if(val===1||val===2) { reasonDetail.attr('placeholder','可选').removeClass('required').fadeIn(); } else { reasonDetail.attr('placeholder','必填').addClass('required').removeClass('invalid').fadeIn(); } } }); $('#reason-detail').hide(); });
JavaScript
function getusertorrentlistajax(userid, type, blockid) { var target= $('#' + blockid); if (target.html()==""){ $.get('getusertorrentlistajax.php?userid='+userid+'&type='+type, function(result) { target.html(result); target.find('table').tablesorter(); klappe_news(blockid.substr(1)); }); } else { klappe_news(blockid.substr(1)); } } function enabledel(msg){ document.deluser.submit.disabled=document.deluser.submit.checked; alert (msg); } function disabledel(){ document.deluser.submit.disabled=!document.deluser.submit.checked; } $(function() { $('#send-bonus').click(function(e) { e.preventDefault(); var form = $('<form></form>', { html : '<input type="hidden" name="option" value="7"><input type="hidden" name="userid" value="'+ hb.user.id +'" /><ul><li><label>赠送魔力值数量: <input type="number" name="bonusgift" min="25" max="10000" value="1000" required /></label></li><li><label>留言: <input type="text" name="message" maxlength="100" /></label></li></ul>', 'class' : 'minor-list', action : '//' + hb.constant.url.base + '/takebonusexchange.php?format=json', method : 'post' }); jqui_form(form, '赠送魔力值', function(result, dialog) { if (result.success) { $('#bonus, .bonus').text(result.bonus); $('#uploaded').text(result.uploaded); $('#invites').text(result.invites); jqui_dialog(result.title, result.text, 3000); return true; } else { $('#dialog-hint').html(result.text); return false; } }); }); });
JavaScript
$(function() { var table = $('#torrents'); var target = $('#torrents>tbody'); var targetH = target.height(); var surfix = '&format=json'; var lang = hb.constant.lang; var isManager = (parseInt(hb.config.user['class']) >= hb.constant.torrentmanage_class); var $document = $(document); var $window = $(window); var ie = $.browser.msie; var ie8 = ie && $.browser.version < 9; var History = !ie; var args = argsFromUri(window.location.search); var oripage = parseInt(args.page) || 0; var disableAutoPaging = false; //Auto paging switch var auto_paging_switch = $('<input />', { type : 'checkbox', id : 'disable-autopaging', title : '换了浏览器要重新设置的亲' }).click(function() { disableAutoPaging = (auto_paging_switch.attr('checked') === 'checked'); console.log(disableAutoPaging); $.jStorage.set('disableAutoPaging', disableAutoPaging); }); if ($.jStorage.get('disableAutoPaging', false)) { disableAutoPaging = true; auto_paging_switch.attr('checked', 'checked'); } $('#hotbox>ul').append($('<li></li>').append(auto_paging_switch).append($('<label></label>', { text : '禁用自动翻页', 'for' : 'disable-autopaging', title : '刷新后生效' }))); var $sortHeaders = table.find('thead th:not(.unsortable)'); var sortHeader = function(isJs) { if (isJs) { $sortHeaders.unbind('click'); table.tablesorter(); return; } var sortcol; var sortcoltype; if ($.isArray(args)) { var deletes = []; $.each(args, function(idx, obj) { if (obj.name === 'sort') { sortcol = obj.value; deletes.push(idx); } else if (obj.name === 'type') { sortcoltype = obj.value deletes.push(idx); } }); $.each(deletes.sort(), function(idx, obj) { args.splice(obj, 1); }); } else { sortcol = args.sort; sortcoltype = args.type; delete args.sort; delete args.type; } $sortHeaders.each(function() { var $this = $(this); var col = $this.attr('value'); var sorttype; var sortclass = 'headerSort'; if (sortcol === col) { if (sortcoltype === 'desc') { sorttype = 'asc'; sortclass += ' headerSortUp'; } else { sorttype = 'desc'; sortclass += ' headerSortDown'; } } else { if (col === '1' || col ==='4') { sorttype = 'asc'; if (col === '4' && typeof(sortcol) === 'undefined') { sortclass += ' headerSortUp'; } } else { sorttype = 'desc'; } } var coltitle; if (sorttype === 'asc') { coltitle = '升序排序'; } else { coltitle = '降序排序'; } $this.attr({ 'class': sortclass, title : coltitle }).unbind('click').click(function() { if ($.isArray(args)) { var sort = false; var type = false; $.each(args, function(idx, obj) { if (obj.name === 'sort') { obj.value = col; sort = true; } else if (obj.name === 'type') { obj.value = sorttype; type = true; } }); if (!sort) { args.push({name : 'sort', value :col}); } if (!type) { args.push({name : 'type', value : sorttype}); } } else { args.sort = col; args.type = sorttype; } getFromUriWithHistory(args); }); }); }; table.find('thead th:not(.unsortable)').each(function() { var $this = $(this); $this.html($this.find('a').html()); }); sortHeader(!hb.nextpage); // Go to content var goToContent = (function() { var $top = $('#content-marker'); return function() { var top = $top.offset().top; scrollToPosition(top); }; })(); //Spin loader var loader = (function() { var $loader = $('#loader'); var loaderInt; var step = 0; var lock = false; return function(show) { if (show) { if(lock) { return false; } else { lock = true; } $loader.show(); $loader.attr('class', 'loader' + step); loaderInt = setInterval(function() { step += 1; if (step == 12) { step = 0; } $loader.attr('class', 'loader' + step); }, 100); } else { $loader.hide(); clearInterval(loaderInt); lock = false; } return true; }; })(); //Auto filling width //CAUTION: This method have critical problems in performance under ie var setTitleWidth; if (ie) { setTitleWidth = function(targets) { return false; } } else { var modifyCss = function(wThis, target, wDecorations) { var ref = wThis - wDecorations - 6; if (target[0].offsetWidth > ref) { target.css('width', ref + 'px'); } } setTitleWidth = function(targets) { //console.profile(); targets.each(function() { var $this = $(this); var wThis = $this.width(); var $prs = $this.find('ul.prs'); var pr0 = $prs[0]; var pr1 = $prs[1]; var img = $this.find('img.sticky')[0]; var wTitleD = 0; var wDescD = 0; if (pr0) { wTitleD += pr0.offsetWidth; } if (img) { wTitleD += img.offsetWidth; } if (pr1) { wDescD += pr1.offsetWidth; } modifyCss(wThis, $this.find('h2'), wTitleD); }); //console.profileEnd(); }; setTitleWidth($('td.torrent div.limit-width.minor-list')); } //Handling quick delete var quickDelete; var quickEdit; if (isManager) { quickDelete = function(a) { a.click(function(e) { var id = argsFromUri(this.href).id; if (id) { e.preventDefault(); deleteTorrent(id); } }); }; quickDelete(target.find('.staff-quick-delete')); quickEdit = function(a) { a.click(function (e) { var id = argsFromUri(this.href).id; if (id) { e.preventDefault(); editTorrent(id); } }); }; quickEdit(target.find('.staff-quick-edit')); } else { quickDelete = function() {}; quickEdit = quickDelete; } //Convert json to html var user_out = function(user) { var userClass = user['class'].canonical; var userCss = userClass.replace(/\s/g, '') + '_Name username'; var href = 'userdetails.php?id=' + user.id; var out = '<span class="nowrap"><a href="' + href + '" class="' + userCss + '">' + user.username + '</a>'; if (user.donor) { out += '<img src="pic/trans.gif" alt="Donor" class="star"/>'; } out += '</span>'; return out; }; var addNumber = function(str, hrefZero, href, zeroClass) { var out = '<td><a'; var comments_num = parseInt(str); if (comments_num === 0) { href = hrefZero; } if (href) { out += ' href="' + href + '"' } if (comments_num !== 0) { out +=' class="important"' } else if (zeroClass) { out +=' class="' + zeroClass + '"' } out += '>' + str + '</a></td>'; return out; } var get_func = function(res) { // var start = ((new Date()).getTime()); var catDict = hb['constant'].cat_class; var targetsAppearance = []; var tableLength = target.find('tr').length - 1; var returnto = document.location.pathname + document.location.search; if (isManager) { var page = argsFromUri(this.url).page; var pagesurfix = ''; if (page) { pagesurfix = 'page=' + page; if (document.location.search) { returnto += '&' + pagesurfix; } else { returnto += '?' + pagesurfix; } } } returnto = encodeURIComponent(returnto); $.each(res.torrents, function(idx, torrent) { var id = torrent.id; var tr = '<tr>'; var catid = torrent.catid; var catProp = catDict[catid]; var cat = '<td class="nowrap category-icon">'; if (catProp) { var href = '?cat=' + catid; cat += '<a href="' + href + '"><img src="pic/cattrans.gif" alt="' + catProp.name + '" title="' + catProp.name + '" class="' + catProp.class_name + '" />'; } cat += '</td>'; tr += cat; var title_td = '<td class="torrent">'; var title_desc = '<div class="limit-width minor-list">'; var bookmarkClass = torrent.bookmarked ? 'bookmark' : 'delbookmark'; var textMainTitle = torrent.name; var textSubTitle = torrent.desc; if (args.swaph && textSubTitle !== '') { var buf = textMainTitle; textMainTitle = textSubTitle; textSubTitle = buf; } href = 'details.php?id=' + id + '&hit=1'; var mainTitle = ''; var position = torrent.position; if (position) { var posexpire = position.expire; var sticky = position.sticky; var randomsticky = position.randomsticky; var lucky = position.lucky; if(sticky||(randomsticky&&lucky)){ mainTitle += '<img class="sticky" src="pic/trans.gif" alt="Sticky" title="' + lang.text_sticky + lang.text_until+posexpire+'">'; } } mainTitle += '<h2 class="transparentbg"><a href="' + href + '" title="' + textMainTitle + '">' + textMainTitle + '</a></h2>'; var desc; if (textSubTitle === '') { desc = '<h3 class="placeholder"></h3>'; } else { desc = '<h3 title="' + textSubTitle + '">' + textSubTitle + '</h3>'; } var div_main = '<div class="torrent-title">' + mainTitle; var div_desc = '<div class="torrent-title">' + desc; var mainTitleDecorators = '<ul class="prs">'; if (torrent['new']) { mainTitleDecorators += '<li>(<span class="new">' + lang.text_new_uppercase + '</span>)</li>'; } var picktype = torrent.picktype; if (picktype) { var ptype = picktype; var hptype = '<li><span>[<span class="' + ptype + '">' + lang['text_' + ptype] + '</span>]</span></li>' mainTitleDecorators += hptype; } var pr = torrent.pr; if (pr) { var state = pr.state; var prDict = hb.constant.pr[state - 1]; var expire = pr.expire; var hexpire = ""; var $time = $('<span></span>', {text : lang.text_will_end_in}); if (expire) { hexpire += lang.text_until+expire.raw; } else { hexpire += lang.text_until + lang.text_forever; } var prLabel = '<li><img class="' + prDict.name + '" title="'+hexpire+'" alt="' + lang[prDict.lang] + '" src="pic/trans.gif" /></li>' mainTitleDecorators += prLabel; } if (torrent.oday) { var oday = '<li><img src="pic/ico_0day.gif" alt="' + lang.text_oday + '" title="' + lang.text_oday + '"/></li>'; mainTitleDecorators += oday; } if (torrent.storing) { var storing = '<li><img src="pic/ico_storing.png" alt="' + lang.text_storing + '" title="' + lang.text_storing + '"/></li>'; mainTitleDecorators += storing; } if (torrent.banned) { var banned = '<li><span>(<span class="striking">' + lang.text_banned + '</span>)</span></li>' mainTitleDecorators += banned; } div_main += mainTitleDecorators + '</ul></div>'; title_desc += div_main + div_desc; var title = '<div>' + title_desc + '</div>'; var torrent_utitly = '<div class="torrent-utilty-icons minor-list-vertical"><ul><li><a href="download.php?id=' + id + '&hit=1"><img class="download" src="pic/trans.gif" alt="download" title="' + lang.title_download_torrent + '" /></a></li><li><a id="bookmark' + id + '" href="javascript: bookmark(' + id + ');"><img class="' + bookmarkClass + '" alt="bookmark" src="pic/trans.gif" title="' + lang.title_bookmark_torrent + '" /></a></li></ul></div>'; title += torrent_utitly; title_td += title + '</div></td>'; tr += title_td; tr += addNumber(torrent.comments.count, 'comment.php?action=add&pid=' + id + '&type=torrent', 'details.php?id=' + id + '&hit=1&cmtpage=1#startcomments'); var time = '<td>' + torrent.added.canonical + '</td>'; tr += time; var size = '<td>' + torrent.size.canonical + '</td>'; tr += size; var seeders = addNumber(torrent.seeders, '', 'details.php?id=' + id + '&hit=1&dllist=1#seeders', 'no-seeders'); tr += seeders; var leechers = addNumber(torrent.leechers, '', 'details.php?id=' + id + '&hit=1&dllist=1#leechers'); tr += leechers; var completed = addNumber(torrent.times_completed, '', 'viewsnatches.php?id=' + id); tr += completed; var towner = '<td>'; var owner = torrent.owner; if (owner.anonymous) { towner += lang.text_anonymous; } var user = owner.user; if (user) { if (owner.anonymous) { towner += '<br />('; } towner += user_out(user); if (owner.anonymous) { towner += ')'; } } else if (!owner.anonymous) { towner += lang.text_orphaned; } towner += '</td>'; tr += towner; if (isManager) { href = 'edit.php?id=' + id + '#delete'; var fastdelete = '<li><a href="' + href + '" class="staff-quick-delete"><img class="staff_delete" alt="D" src="pic/trans.gif" title="' + lang.text_delete + '" /></a></li>'; href = 'edit.php?id=' + id + '&returnto=' + returnto; var fastedit = '<li><a class="staff-quick-edit" href="' + href + '"><img class="staff_edit" alt="E" src="pic/trans.gif" title="' + lang.text_edit + '" /></a></li>'; var edit = '<td><div class="minor-list-vertical"><ul>' + fastdelete + fastedit + '</ul></div></td>'; tr += edit; } tr += '</tr>'; target.append(tr); }); loader(false); var newRows = (tableLength == -1) ? target.find('tr') : target.find('tr:gt(' + tableLength + ')'); if (!ie) { setTitleWidth(newRows.find('div.limit-width.minor-list')); } if (isManager) { quickDelete(newRows.find('.staff-quick-delete')); quickEdit(newRows.find('.staff-quick-edit')); } var cont = res['continue']; if (cont && !disableAutoPaging) { var uri = cont + surfix; var targetH = target.height(); $document.scroll(function() { var loc = $document.scrollTop() + $window.height(); if(loc > targetH && loader(true)) { args = argsFromUri(uri); $.getJSON(uri, get_func); $document.unbind('scroll'); } }); } else { $('#pagertop').remove(); sortHeader(true); } // var end = ((new Date()).getTime()); // console.log(end - start); }; //Auto scroll if (hb.nextpage !== '' && !disableAutoPaging) { $document.scroll(function(){ var loc = $document.scrollTop() + $(window).height(); if(loc > targetH && loader(true)) { var uri = hb.nextpage + surfix; args = argsFromUri(uri); $.getJSON(uri, function(res) { $('#pagerbottom').remove(); $.proxy(get_func, this)(res); }); $document.unbind('scroll'); } }); } var getFromUri = function(uri) { if (!loader(true)) { return false; } $('.pages').remove(); $('#torrents tbody tr').remove(); table.hide(); $('#stderr').remove(); $.getJSON('?' + $.param(uri), {format : 'json'}, function(result) { var targ = $('#outer'); if (result.torrents.length) { table.before(result.pager.top); sortHeader(!result['continue']); table.show(); table.after(result.pager.bottom); $('.pages a[href^="?"]').click(function(e) { e.preventDefault(); var uri = argsFromUri(this.href); getFromUriWithHistory(uri); }); $document.unbind('scroll'); $.proxy(get_func, this)(result); } else { loader(false); targ.append('<div id="stderr"><h2>没有结果!</h2><div class="table td frame">没有种子:(</div></div>'); } goToContent(); oripage = parseInt(argsFromUri(document.location.search).page) || 0; }); }; //Ajax search var getFromUriWithHistory = function(argu) { var uri = '?' + $.param(argu); var state = { title : document.title, url : uri } if (History) { window.history.pushState(state, document.title, uri); } args = argu; getFromUri(args); }; var searchboxform = $('#form-searchbox'); searchboxform.submit(function(e) { e.preventDefault(); var query = searchboxform.serializeArray(); getFromUriWithHistory(query); }); $('a[href^="?"]').click(function(e) { e.preventDefault(); var uri = argsFromUri(this.href); getFromUriWithHistory(uri); }); if (History) { var initialURL = window.location.href; var state = { title : document.title, url : initialURL } window.addEventListener('popstate', function(e){ var initialPop = !(('state' in e) && e.state) && location.href == initialURL; if (initialPop) return; var t; if (hb.config.torrents_query !== '') { t = '?' + hb.config.torrents_query; } else { t = ''; } var backPop = (t === location.search); if (backPop) return; getFromUri(argsFromUri(window.location.href)); }, false); window.history.replaceState(state, document.title, initialURL); (function() { var rowHeight = target.find('tr').height() || 42; var offsetT = target.offset().top; var page = argsFromUri(document.location.search).page || 0; var onscroll = function() { var loc = $document.scrollTop() - offsetT; var row = loc / rowHeight + 5; var npage = Math.floor(row / 50) + oripage; if (npage != page && npage >= oripage) { args = argsFromUri(document.location.search); page = npage; args.page = page; var uri = '?' + $.param(args); var state = { title : document.title, url : uri } window.history.replaceState(state, document.title, uri); } }; $window.scroll(onscroll); })(); } //Check items in searchbox var mainCheckClicked = false; var dictChecks = []; var check = function(item) { item.attr('checked', 'checked'); }; var uncheck = function(item) { item.removeAttr('checked'); }; var mainChecked = function(mainCheck, catChecks) { var setCheck; if (mainCheck.attr('checked')) { setCheck = check; } else { setCheck = uncheck; } $.each(catChecks, function(idx, item) { setCheck(item); }); }; var catClicked = function (isMain, mainCheck, catChecks) { if (isMain) { if (!mainCheckClicked) { mainCheckClicked = true; $.each(dictChecks, function(idx, item) { var main = item.main; var cats = item.cats; mainChecked(main, cats); }); } else { mainChecked(mainCheck, catChecks); } } else { mainCheckClicked = false; var alltrue = true; $.each(catChecks, function(idx, item) { alltrue = item.attr('checked') && alltrue; }); if (alltrue) { check(mainCheck); } else { uncheck(mainCheck); } } }; var allCatChecks = $.map(hb.constant.maincats, function(item, idx) { var mainCheck = $('#cat' + idx); var catChecks = $.map(item, function(cat) { return $('#cat' + cat); }); mainCheck.click(function() { catClicked(true, mainCheck, catChecks); }); $.each(catChecks, function(idx, item) { item.click(function() { catClicked(false, mainCheck, catChecks); }); }); dictChecks.push({ main :mainCheck, cats : catChecks }); return catChecks; }); //Use exact in imdb & username $('[name="search_area"]').change(function() { if (parseInt(this.value) >= 3) { //Username or imdb $('[name="search_mode"]').val('3'); } else { $('[name="search_mode"]').val('0'); } }); //Auto complete var cache = {}; var lastXhr; $( "#searchinput" ).autocomplete({ minLength: 2, source: function( request, response ) { var term = request.term; if ( term in cache ) { response( cache[ term ] ); return; } lastXhr = $.getJSON( "suggest.php", request, function( data, status, xhr ) { cache[ term ] = data; if ( xhr === lastXhr ) { response( data ); } }); } }).data( "autocomplete" )._renderItem = function( ul, item ) { var stime = item.count + ' Time'; if (item.count > 1) { stime += 's'; } return $( "<li></li>" ) .data( "item.autocomplete", item ) .append( "<a>" + item.label + '<span class="suggestion-count">' + stime + "</span></a>" ) .appendTo( ul ); }; }); //Select all var form='searchbox'; function SetChecked(chkName,ctrlName,checkall_name,uncheckall_name,start,count) { var dml=document.forms[form]; var len = dml.elements.length; var begin; var end; var check_state; if (start == -1){ begin = 0; end = len; } else{ begin = start; end = start + count; } var check_state; var button = document.getElementById(ctrlName) if(button.value == checkall_name) { button.value = uncheckall_name; check_state=1; } else { button.value = checkall_name; check_state=0; } for( i=begin ; i<end ; i++) { if (dml.elements[i].name.indexOf(chkName) != -1) { dml.elements[i].checked=check_state; } } }
JavaScript
$(function() { $('table').tablesorter(); });
JavaScript
$(function() { var args = argsFromUri(location.href); if (args.action === 'viewforum') { $('.headerSort').click(function(e) { e.preventDefault(); var href = $(this).find('a').attr('href'); window.location.href = href; }); } $('#forum-movetopic').submit(function(e) { e.preventDefault(); var form = $(this); var targetF = form.find('[name="forumid"] :selected'); if (targetF.length === 0) { jqui_dialog('失败', '无目标板块', 3000); } else { jqui_confirm('移动主题', '确认将本主题移动到' + targetF.text() + '么?', function() { var data = form.serializeArray(); data.push({ name : 'format', value : 'json' }); $.post(form.attr('action'), data, function(result) { if (result.success) { jqui_dialog('移动成功', '成功移动主题', 3000); } }); return true; }); } }); });
JavaScript
/* * ----------------------------- JSTORAGE ------------------------------------- * Simple local storage wrapper to save data on the browser side, supporting * all major browsers - IE6+, Firefox2+, Safari4+, Chrome4+ and Opera 10.5+ * * Copyright (c) 2010 Andris Reinman, andris.reinman@gmail.com * Project homepage: www.jstorage.info * * Licensed under MIT-style license: * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ /** * $.jStorage * * USAGE: * * jStorage requires Prototype, MooTools or jQuery! If jQuery is used, then * jQuery-JSON (http://code.google.com/p/jquery-json/) is also needed. * (jQuery-JSON needs to be loaded BEFORE jStorage!) * * Methods: * * -set(key, value) * $.jStorage.set(key, value) -> saves a value * * -get(key[, default]) * value = $.jStorage.get(key [, default]) -> * retrieves value if key exists, or default if it doesn't * * -deleteKey(key) * $.jStorage.deleteKey(key) -> removes a key from the storage * * -flush() * $.jStorage.flush() -> clears the cache * * -storageObj() * $.jStorage.storageObj() -> returns a read-ony copy of the actual storage * * -storageSize() * $.jStorage.storageSize() -> returns the size of the storage in bytes * * -index() * $.jStorage.index() -> returns the used keys as an array * * -storageAvailable() * $.jStorage.storageAvailable() -> returns true if storage is available * * -reInit() * $.jStorage.reInit() -> reloads the data from browser storage * * <value> can be any JSON-able value, including objects and arrays. * **/ (function($){ if(!$ || !($.toJSON || Object.toJSON || window.JSON)){ throw new Error("jQuery, MooTools or Prototype needs to be loaded before jStorage!"); } var /* This is the object, that holds the cached values */ _storage = {}, /* Actual browser storage (localStorage or globalStorage['domain']) */ _storage_service = {jStorage:"{}"}, /* DOM element for older IE versions, holds userData behavior */ _storage_elm = null, /* How much space does the storage take */ _storage_size = 0, /* function to encode objects to JSON strings */ json_encode = $.toJSON || Object.toJSON || (window.JSON && (JSON.encode || JSON.stringify)), /* function to decode objects from JSON strings */ json_decode = $.evalJSON || (window.JSON && (JSON.decode || JSON.parse)) || function(str){ return String(str).evalJSON(); }, /* which backend is currently used */ _backend = false, /* Next check for TTL */ _ttl_timeout, /** * XML encoding and decoding as XML nodes can't be JSON'ized * XML nodes are encoded and decoded if the node is the value to be saved * but not if it's as a property of another object * Eg. - * $.jStorage.set("key", xmlNode); // IS OK * $.jStorage.set("key", {xml: xmlNode}); // NOT OK */ _XMLService = { /** * Validates a XML node to be XML * based on jQuery.isXML function */ isXML: function(elm){ var documentElement = (elm ? elm.ownerDocument || elm : 0).documentElement; return documentElement ? documentElement.nodeName !== "HTML" : false; }, /** * Encodes a XML node to string * based on http://www.mercurytide.co.uk/news/article/issues-when-working-ajax/ */ encode: function(xmlNode) { if(!this.isXML(xmlNode)){ return false; } try{ // Mozilla, Webkit, Opera return new XMLSerializer().serializeToString(xmlNode); }catch(E1) { try { // IE return xmlNode.xml; }catch(E2){} } return false; }, /** * Decodes a XML node from string * loosely based on http://outwestmedia.com/jquery-plugins/xmldom/ */ decode: function(xmlString){ var dom_parser = ("DOMParser" in window && (new DOMParser()).parseFromString) || (window.ActiveXObject && function(_xmlString) { var xml_doc = new ActiveXObject('Microsoft.XMLDOM'); xml_doc.async = 'false'; xml_doc.loadXML(_xmlString); return xml_doc; }), resultXML; if(!dom_parser){ return false; } resultXML = dom_parser.call("DOMParser" in window && (new DOMParser()) || window, xmlString, 'text/xml'); return this.isXML(resultXML)?resultXML:false; } }; ////////////////////////// PRIVATE METHODS //////////////////////// /** * Initialization function. Detects if the browser supports DOM Storage * or userData behavior and behaves accordingly. * @returns undefined */ function _init(){ /* Check if browser supports localStorage */ var localStorageReallyWorks = false; if("localStorage" in window){ try { window.localStorage.setItem('_tmptest', 'tmpval'); localStorageReallyWorks = true; window.localStorage.removeItem('_tmptest'); } catch(BogusQuotaExceededErrorOnIos5) { // Thanks be to iOS5 Private Browsing mode which throws // QUOTA_EXCEEDED_ERRROR DOM Exception 22. } } if(localStorageReallyWorks){ try { if(window.localStorage) { _storage_service = window.localStorage; _backend = "localStorage"; } } catch(E3) {/* Firefox fails when touching localStorage and cookies are disabled */} } /* Check if browser supports globalStorage */ else if("globalStorage" in window){ try { if(window.globalStorage) { _storage_service = window.globalStorage[window.location.hostname]; _backend = "globalStorage"; } } catch(E4) {/* Firefox fails when touching localStorage and cookies are disabled */} } /* Check if browser supports userData behavior */ else { _storage_elm = document.createElement('link'); if(_storage_elm.addBehavior){ /* Use a DOM element to act as userData storage */ _storage_elm.style.behavior = 'url(#default#userData)'; /* userData element needs to be inserted into the DOM! */ document.getElementsByTagName('head')[0].appendChild(_storage_elm); _storage_elm.load("jStorage"); var data = "{}"; try{ data = _storage_elm.getAttribute("jStorage"); }catch(E5){} _storage_service.jStorage = data; _backend = "userDataBehavior"; }else{ _storage_elm = null; return; } } _load_storage(); // remove dead keys _handleTTL(); } /** * Loads the data from the storage based on the supported mechanism * @returns undefined */ function _load_storage(){ /* if jStorage string is retrieved, then decode it */ if(_storage_service.jStorage){ try{ _storage = json_decode(String(_storage_service.jStorage)); }catch(E6){_storage_service.jStorage = "{}";} }else{ _storage_service.jStorage = "{}"; } _storage_size = _storage_service.jStorage?String(_storage_service.jStorage).length:0; } /** * This functions provides the "save" mechanism to store the jStorage object * @returns undefined */ function _save(){ try{ _storage_service.jStorage = json_encode(_storage); // If userData is used as the storage engine, additional if(_storage_elm) { _storage_elm.setAttribute("jStorage",_storage_service.jStorage); _storage_elm.save("jStorage"); } _storage_size = _storage_service.jStorage?String(_storage_service.jStorage).length:0; }catch(E7){/* probably cache is full, nothing is saved this way*/} } /** * Function checks if a key is set and is string or numberic */ function _checkKey(key){ if(!key || (typeof key != "string" && typeof key != "number")){ throw new TypeError('Key name must be string or numeric'); } if(key == "__jstorage_meta"){ throw new TypeError('Reserved key name'); } return true; } /** * Removes expired keys */ function _handleTTL(){ var curtime, i, TTL, nextExpire = Infinity, changed = false; clearTimeout(_ttl_timeout); if(!_storage.__jstorage_meta || typeof _storage.__jstorage_meta.TTL != "object"){ // nothing to do here return; } curtime = +new Date(); TTL = _storage.__jstorage_meta.TTL; for(i in TTL){ if(TTL.hasOwnProperty(i)){ if(TTL[i] <= curtime){ delete TTL[i]; delete _storage[i]; changed = true; }else if(TTL[i] < nextExpire){ nextExpire = TTL[i]; } } } // set next check if(nextExpire != Infinity){ _ttl_timeout = setTimeout(_handleTTL, nextExpire - curtime); } // save changes if(changed){ _save(); } } ////////////////////////// PUBLIC INTERFACE ///////////////////////// $.jStorage = { /* Version number */ version: "0.1.6.1", /** * Sets a key's value. * * @param {String} key - Key to set. If this value is not set or not * a string an exception is raised. * @param value - Value to set. This can be any value that is JSON * compatible (Numbers, Strings, Objects etc.). * @returns the used value */ set: function(key, value){ _checkKey(key); if(_XMLService.isXML(value)){ value = {_is_xml:true,xml:_XMLService.encode(value)}; }else if(typeof value == "function"){ value = null; // functions can't be saved! }else if(value && typeof value == "object"){ // clone the object before saving to _storage tree value = json_decode(json_encode(value)); } _storage[key] = value; _save(); return value; }, /** * Looks up a key in cache * * @param {String} key - Key to look up. * @param {mixed} def - Default value to return, if key didn't exist. * @returns the key value, default value or <null> */ get: function(key, def){ _checkKey(key); if(key in _storage){ if(_storage[key] && typeof _storage[key] == "object" && _storage[key]._is_xml && _storage[key]._is_xml){ return _XMLService.decode(_storage[key].xml); }else{ return _storage[key]; } } return typeof(def) == 'undefined' ? null : def; }, /** * Deletes a key from cache. * * @param {String} key - Key to delete. * @returns true if key existed or false if it didn't */ deleteKey: function(key){ _checkKey(key); if(key in _storage){ delete _storage[key]; // remove from TTL list if(_storage.__jstorage_meta && typeof _storage.__jstorage_meta.TTL == "object" && key in _storage.__jstorage_meta.TTL){ delete _storage.__jstorage_meta.TTL[key]; } _save(); return true; } return false; }, /** * Sets a TTL for a key, or remove it if ttl value is 0 or below * * @param {String} key - key to set the TTL for * @param {Number} ttl - TTL timeout in milliseconds * @returns true if key existed or false if it didn't */ setTTL: function(key, ttl){ var curtime = +new Date(); _checkKey(key); ttl = Number(ttl) || 0; if(key in _storage){ if(!_storage.__jstorage_meta){ _storage.__jstorage_meta = {}; } if(!_storage.__jstorage_meta.TTL){ _storage.__jstorage_meta.TTL = {}; } // Set TTL value for the key if(ttl>0){ _storage.__jstorage_meta.TTL[key] = curtime + ttl; }else{ delete _storage.__jstorage_meta.TTL[key]; } _save(); _handleTTL(); return true; } return false; }, /** * Deletes everything in cache. * * @return true */ flush: function(){ _storage = {}; _save(); return true; }, /** * Returns a read-only copy of _storage * * @returns Object */ storageObj: function(){ function F() {} F.prototype = _storage; return new F(); }, /** * Returns an index of all used keys as an array * ['key1', 'key2',..'keyN'] * * @returns Array */ index: function(){ var index = [], i; for(i in _storage){ if(_storage.hasOwnProperty(i) && i != "__jstorage_meta"){ index.push(i); } } return index; }, /** * How much space in bytes does the storage take? * * @returns Number */ storageSize: function(){ return _storage_size; }, /** * Which backend is currently in use? * * @returns String */ currentBackend: function(){ return _backend; }, /** * Test if storage is available * * @returns Boolean */ storageAvailable: function(){ return !!_backend; }, /** * Reloads the data from browser storage * * @returns undefined */ reInit: function(){ var new_storage_elm, data; if(_storage_elm && _storage_elm.addBehavior){ new_storage_elm = document.createElement('link'); _storage_elm.parentNode.replaceChild(new_storage_elm, _storage_elm); _storage_elm = new_storage_elm; /* Use a DOM element to act as userData storage */ _storage_elm.style.behavior = 'url(#default#userData)'; /* userData element needs to be inserted into the DOM! */ document.getElementsByTagName('head')[0].appendChild(_storage_elm); _storage_elm.load("jStorage"); data = "{}"; try{ data = _storage_elm.getAttribute("jStorage"); }catch(E5){} _storage_service.jStorage = data; _backend = "userDataBehavior"; } _load_storage(); } }; // Initialize jStorage _init(); })(window.jQuery || window.$);
JavaScript
// $(function() { // $('#caticon, #stylesheet').change(function() { // $('#hints').dialog({position:'right'}); // }); // });
JavaScript
$(function() { $('table').tablesorter(); });
JavaScript
$(function() { $('table').tablesorter(); });
JavaScript
$(function() { var posting = false; var submits = $('#outer :submit:enabled'); var dialog = $('<div></div>', { title : '确认', text : '你确定要交换该项魔力值么?' }).dialog({ modal : true, autoOpen : false }); $('#outer form').submit(function(e) { e.preventDefault(); if (posting) { return; } var form = $(this); var price = form.find('.bonus-price').text(); var text; if (price) { text = '你确定要花费' + price + '魔力值交换' + form.find('.bonus-title').text() + '么?'; } else { var text = '你确定要' + form.find('.bonus-title').text() + '么?'; } dialog.text(text).dialog('option', 'buttons', { OK : function() { posting = true; submits.attr('disabled', 'disabled'); var query = form.serializeArray(); $.post('takebonusexchange.php?format=json', query, function(result) { posting = false; submits.removeAttr('disabled'); $target = $('#mybonus-result-text'); if (result.success) { $('#bonus, .bonus').text(result.bonus); $('#uploaded').text(result.uploaded); $('#invites').text(result.invites); } $target.html(result.text); $target.dialog({ title : result.title, modal : true }); setTimeout(function(){$target.dialog("close")},5000); }, 'json'); dialog.dialog("close"); }, Cancel: function() { dialog.dialog("close"); } }).dialog('open'); }); var giftSelect = $('#giftselect'); var txtCustom = $("#giftcustom"); var giftSubmit = $('#bonus-7 :submit'); giftSelect.change(function() { if (this.value == '0'){ txtCustom.show().removeAttr('disabled').keyup(validateGift); txtCustom.focus(); } else { txtCustom.hide().attr('disabled', 'disabled').unbind('keyup'); txtCustom.val(''); } validateGift(); }); var validateGift = function() { var amount = giftSelect.val(); if (amount == 0) { amount = txtCustom.val(); } amount = parseInt(amount); if (amount > parseInt(hb.config.user.bonus)) { giftSubmit.attr('disabled', 'disabled').val('再去多赚点吧'); } else if (amount < 25) { giftSubmit.attr('disabled', 'disabled').val('这么一点能拿得出手?'); } else if(amount > 10000) { giftSubmit.attr('disabled', 'disabled').val('不要太大方了嘛'); } else if (!$('#gift-username').val()) { giftSubmit.attr('disabled', 'disabled').val('要送给哪位亲呢?'); } else { giftSubmit.removeAttr('disabled').val('赠送'); } }; $('#gift-username').keyup(validateGift); validateGift(); var karmaSubmit = $('#bonus-9 :submit'); var karmaSelect = $('#charityselect'); var validateKarma = function() { var amount = parseInt(karmaSelect.val()); if (amount > parseInt(hb.config.user.bonus)) { karmaSubmit.attr('disabled', 'disabled').val('先养活自己吧亲'); } else { karmaSubmit.removeAttr('disabled').val('赠送'); } }; karmaSelect.change(validateKarma); validateKarma(); (function() { var color = $('.color')[0]; if (color.type !== 'color') { // type=color supported console.log(color.value); color.value = color.value.replace(/#/, ''); console.log(color.value); jscolor.bind(); } })(); });
JavaScript
/** * jscolor, JavaScript Color Picker * * @version 1.3.13 * @license GNU Lesser General Public License, http://www.gnu.org/copyleft/lesser.html * @author Jan Odvarko, http://odvarko.cz * @created 2008-06-15 * @updated 2012-01-19 * @link http://jscolor.com */ var jscolor = { dir : 'js/jscolor/', // location of jscolor directory (leave empty to autodetect) bindClass : 'color', // class name binding : false, // automatic binding via <input class="..."> preloading : true, // use image preloading? install : function() { jscolor.addEvent(window, 'load', jscolor.init); }, init : function() { if(jscolor.binding) { jscolor.bind(); } if(jscolor.preloading) { jscolor.preload(); } }, getDir : function() { if(!jscolor.dir) { var detected = jscolor.detectDir(); jscolor.dir = detected!==false ? detected : 'jscolor/'; } return jscolor.dir; }, detectDir : function() { var base = location.href; var e = document.getElementsByTagName('base'); for(var i=0; i<e.length; i+=1) { if(e[i].href) { base = e[i].href; } } var e = document.getElementsByTagName('script'); for(var i=0; i<e.length; i+=1) { if(e[i].src && /(^|\/)jscolor\.js([?#].*)?$/i.test(e[i].src)) { var src = new jscolor.URI(e[i].src); var srcAbs = src.toAbsolute(base); srcAbs.path = srcAbs.path.replace(/[^\/]+$/, ''); // remove filename srcAbs.query = null; srcAbs.fragment = null; return srcAbs.toString(); } } return false; }, bind : function() { var matchClass = new RegExp('(^|\\s)('+jscolor.bindClass+')\\s*(\\{[^}]*\\})?', 'i'); var e = document.getElementsByTagName('input'); for(var i=0; i<e.length; i+=1) { var m; if(!e[i].color && e[i].className && (m = e[i].className.match(matchClass))) { var prop = {}; if(m[3]) { try { eval('prop='+m[3]); } catch(eInvalidProp) {} } e[i].color = new jscolor.color(e[i], prop); } } }, preload : function() { for(var fn in jscolor.imgRequire) { if(jscolor.imgRequire.hasOwnProperty(fn)) { jscolor.loadImage(fn); } } }, images : { pad : [ 181, 101 ], sld : [ 16, 101 ], cross : [ 15, 15 ], arrow : [ 7, 11 ] }, imgRequire : {}, imgLoaded : {}, requireImage : function(filename) { jscolor.imgRequire[filename] = true; }, loadImage : function(filename) { if(!jscolor.imgLoaded[filename]) { jscolor.imgLoaded[filename] = new Image(); jscolor.imgLoaded[filename].src = jscolor.getDir()+filename; } }, fetchElement : function(mixed) { return typeof mixed === 'string' ? document.getElementById(mixed) : mixed; }, addEvent : function(el, evnt, func) { if(el.addEventListener) { el.addEventListener(evnt, func, false); } else if(el.attachEvent) { el.attachEvent('on'+evnt, func); } }, fireEvent : function(el, evnt) { if(!el) { return; } if(document.createEvent) { var ev = document.createEvent('HTMLEvents'); ev.initEvent(evnt, true, true); el.dispatchEvent(ev); } else if(document.createEventObject) { var ev = document.createEventObject(); el.fireEvent('on'+evnt, ev); } else if(el['on'+evnt]) { // alternatively use the traditional event model (IE5) el['on'+evnt](); } }, getElementPos : function(e) { var e1=e, e2=e; var x=0, y=0; if(e1.offsetParent) { do { x += e1.offsetLeft; y += e1.offsetTop; } while(e1 = e1.offsetParent); } while((e2 = e2.parentNode) && e2.nodeName.toUpperCase() !== 'BODY') { x -= e2.scrollLeft; y -= e2.scrollTop; } return [x, y]; }, getElementSize : function(e) { return [e.offsetWidth, e.offsetHeight]; }, getRelMousePos : function(e) { var x = 0, y = 0; if (!e) { e = window.event; } if (typeof e.offsetX === 'number') { x = e.offsetX; y = e.offsetY; } else if (typeof e.layerX === 'number') { x = e.layerX; y = e.layerY; } return { x: x, y: y }; }, getViewPos : function() { if(typeof window.pageYOffset === 'number') { return [window.pageXOffset, window.pageYOffset]; } else if(document.body && (document.body.scrollLeft || document.body.scrollTop)) { return [document.body.scrollLeft, document.body.scrollTop]; } else if(document.documentElement && (document.documentElement.scrollLeft || document.documentElement.scrollTop)) { return [document.documentElement.scrollLeft, document.documentElement.scrollTop]; } else { return [0, 0]; } }, getViewSize : function() { if(typeof window.innerWidth === 'number') { return [window.innerWidth, window.innerHeight]; } else if(document.body && (document.body.clientWidth || document.body.clientHeight)) { return [document.body.clientWidth, document.body.clientHeight]; } else if(document.documentElement && (document.documentElement.clientWidth || document.documentElement.clientHeight)) { return [document.documentElement.clientWidth, document.documentElement.clientHeight]; } else { return [0, 0]; } }, URI : function(uri) { // See RFC3986 this.scheme = null; this.authority = null; this.path = ''; this.query = null; this.fragment = null; this.parse = function(uri) { var m = uri.match(/^(([A-Za-z][0-9A-Za-z+.-]*)(:))?((\/\/)([^\/?#]*))?([^?#]*)((\?)([^#]*))?((#)(.*))?/); this.scheme = m[3] ? m[2] : null; this.authority = m[5] ? m[6] : null; this.path = m[7]; this.query = m[9] ? m[10] : null; this.fragment = m[12] ? m[13] : null; return this; }; this.toString = function() { var result = ''; if(this.scheme !== null) { result = result + this.scheme + ':'; } if(this.authority !== null) { result = result + '//' + this.authority; } if(this.path !== null) { result = result + this.path; } if(this.query !== null) { result = result + '?' + this.query; } if(this.fragment !== null) { result = result + '#' + this.fragment; } return result; }; this.toAbsolute = function(base) { var base = new jscolor.URI(base); var r = this; var t = new jscolor.URI; if(base.scheme === null) { return false; } if(r.scheme !== null && r.scheme.toLowerCase() === base.scheme.toLowerCase()) { r.scheme = null; } if(r.scheme !== null) { t.scheme = r.scheme; t.authority = r.authority; t.path = removeDotSegments(r.path); t.query = r.query; } else { if(r.authority !== null) { t.authority = r.authority; t.path = removeDotSegments(r.path); t.query = r.query; } else { if(r.path === '') { // TODO: == or === ? t.path = base.path; if(r.query !== null) { t.query = r.query; } else { t.query = base.query; } } else { if(r.path.substr(0,1) === '/') { t.path = removeDotSegments(r.path); } else { if(base.authority !== null && base.path === '') { // TODO: == or === ? t.path = '/'+r.path; } else { t.path = base.path.replace(/[^\/]+$/,'')+r.path; } t.path = removeDotSegments(t.path); } t.query = r.query; } t.authority = base.authority; } t.scheme = base.scheme; } t.fragment = r.fragment; return t; }; function removeDotSegments(path) { var out = ''; while(path) { if(path.substr(0,3)==='../' || path.substr(0,2)==='./') { path = path.replace(/^\.+/,'').substr(1); } else if(path.substr(0,3)==='/./' || path==='/.') { path = '/'+path.substr(3); } else if(path.substr(0,4)==='/../' || path==='/..') { path = '/'+path.substr(4); out = out.replace(/\/?[^\/]*$/, ''); } else if(path==='.' || path==='..') { path = ''; } else { var rm = path.match(/^\/?[^\/]*/)[0]; path = path.substr(rm.length); out = out + rm; } } return out; } if(uri) { this.parse(uri); } }, /* * Usage example: * var myColor = new jscolor.color(myInputElement) */ color : function(target, prop) { this.required = true; // refuse empty values? this.adjust = true; // adjust value to uniform notation? this.hash = false; // prefix color with # symbol? this.caps = true; // uppercase? this.slider = true; // show the value/saturation slider? this.valueElement = target; // value holder this.styleElement = target; // where to reflect current color this.onImmediateChange = null; // onchange callback (can be either string or function) this.hsv = [0, 0, 1]; // read-only 0-6, 0-1, 0-1 this.rgb = [1, 1, 1]; // read-only 0-1, 0-1, 0-1 this.pickerOnfocus = true; // display picker on focus? this.pickerMode = 'HSV'; // HSV | HVS this.pickerPosition = 'bottom'; // left | right | top | bottom this.pickerSmartPosition = true; // automatically adjust picker position when necessary this.pickerButtonHeight = 20; // px this.pickerClosable = false; this.pickerCloseText = 'Close'; this.pickerButtonColor = 'ButtonText'; // px this.pickerFace = 10; // px this.pickerFaceColor = 'ThreeDFace'; // CSS color this.pickerBorder = 1; // px this.pickerBorderColor = 'ThreeDHighlight ThreeDShadow ThreeDShadow ThreeDHighlight'; // CSS color this.pickerInset = 1; // px this.pickerInsetColor = 'ThreeDShadow ThreeDHighlight ThreeDHighlight ThreeDShadow'; // CSS color this.pickerZIndex = 10000; for(var p in prop) { if(prop.hasOwnProperty(p)) { this[p] = prop[p]; } } this.hidePicker = function() { if(isPickerOwner()) { removePicker(); } }; this.showPicker = function() { if(!isPickerOwner()) { var tp = jscolor.getElementPos(target); // target pos var ts = jscolor.getElementSize(target); // target size var vp = jscolor.getViewPos(); // view pos var vs = jscolor.getViewSize(); // view size var ps = getPickerDims(this); // picker size var a, b, c; switch(this.pickerPosition.toLowerCase()) { case 'left': a=1; b=0; c=-1; break; case 'right':a=1; b=0; c=1; break; case 'top': a=0; b=1; c=-1; break; default: a=0; b=1; c=1; break; } var l = (ts[b]+ps[b])/2; // picker pos if (!this.pickerSmartPosition) { var pp = [ tp[a], tp[b]+ts[b]-l+l*c ]; } else { var pp = [ -vp[a]+tp[a]+ps[a] > vs[a] ? (-vp[a]+tp[a]+ts[a]/2 > vs[a]/2 && tp[a]+ts[a]-ps[a] >= 0 ? tp[a]+ts[a]-ps[a] : tp[a]) : tp[a], -vp[b]+tp[b]+ts[b]+ps[b]-l+l*c > vs[b] ? (-vp[b]+tp[b]+ts[b]/2 > vs[b]/2 && tp[b]+ts[b]-l-l*c >= 0 ? tp[b]+ts[b]-l-l*c : tp[b]+ts[b]-l+l*c) : (tp[b]+ts[b]-l+l*c >= 0 ? tp[b]+ts[b]-l+l*c : tp[b]+ts[b]-l-l*c) ]; } drawPicker(pp[a], pp[b]); } }; this.importColor = function() { if(!valueElement) { this.exportColor(); } else { if(!this.adjust) { if(!this.fromString(valueElement.value, leaveValue)) { styleElement.style.backgroundImage = styleElement.jscStyle.backgroundImage; styleElement.style.backgroundColor = styleElement.jscStyle.backgroundColor; styleElement.style.color = styleElement.jscStyle.color; this.exportColor(leaveValue | leaveStyle); } } else if(!this.required && /^\s*$/.test(valueElement.value)) { valueElement.value = ''; styleElement.style.backgroundImage = styleElement.jscStyle.backgroundImage; styleElement.style.backgroundColor = styleElement.jscStyle.backgroundColor; styleElement.style.color = styleElement.jscStyle.color; this.exportColor(leaveValue | leaveStyle); } else if(this.fromString(valueElement.value)) { // OK } else { this.exportColor(); } } }; this.exportColor = function(flags) { if(!(flags & leaveValue) && valueElement) { var value = this.toString(); if(this.caps) { value = value.toUpperCase(); } if(this.hash) { value = '#'+value; } valueElement.value = value; } if(!(flags & leaveStyle) && styleElement) { styleElement.style.backgroundImage = "none"; styleElement.style.backgroundColor = '#'+this.toString(); styleElement.style.color = 0.213 * this.rgb[0] + 0.715 * this.rgb[1] + 0.072 * this.rgb[2] < 0.5 ? '#FFF' : '#000'; } if(!(flags & leavePad) && isPickerOwner()) { redrawPad(); } if(!(flags & leaveSld) && isPickerOwner()) { redrawSld(); } }; this.fromHSV = function(h, s, v, flags) { // null = don't change h<0 && (h=0) || h>6 && (h=6); s<0 && (s=0) || s>1 && (s=1); v<0 && (v=0) || v>1 && (v=1); this.rgb = HSV_RGB( h===null ? this.hsv[0] : (this.hsv[0]=h), s===null ? this.hsv[1] : (this.hsv[1]=s), v===null ? this.hsv[2] : (this.hsv[2]=v) ); this.exportColor(flags); }; this.fromRGB = function(r, g, b, flags) { // null = don't change r<0 && (r=0) || r>1 && (r=1); g<0 && (g=0) || g>1 && (g=1); b<0 && (b=0) || b>1 && (b=1); var hsv = RGB_HSV( r===null ? this.rgb[0] : (this.rgb[0]=r), g===null ? this.rgb[1] : (this.rgb[1]=g), b===null ? this.rgb[2] : (this.rgb[2]=b) ); if(hsv[0] !== null) { this.hsv[0] = hsv[0]; } if(hsv[2] !== 0) { this.hsv[1] = hsv[1]; } this.hsv[2] = hsv[2]; this.exportColor(flags); }; this.fromString = function(hex, flags) { var m = hex.match(/^\W*([0-9A-F]{3}([0-9A-F]{3})?)\W*$/i); if(!m) { return false; } else { if(m[1].length === 6) { // 6-char notation this.fromRGB( parseInt(m[1].substr(0,2),16) / 255, parseInt(m[1].substr(2,2),16) / 255, parseInt(m[1].substr(4,2),16) / 255, flags ); } else { // 3-char notation this.fromRGB( parseInt(m[1].charAt(0)+m[1].charAt(0),16) / 255, parseInt(m[1].charAt(1)+m[1].charAt(1),16) / 255, parseInt(m[1].charAt(2)+m[1].charAt(2),16) / 255, flags ); } return true; } }; this.toString = function() { return ( (0x100 | Math.round(255*this.rgb[0])).toString(16).substr(1) + (0x100 | Math.round(255*this.rgb[1])).toString(16).substr(1) + (0x100 | Math.round(255*this.rgb[2])).toString(16).substr(1) ); }; function RGB_HSV(r, g, b) { var n = Math.min(Math.min(r,g),b); var v = Math.max(Math.max(r,g),b); var m = v - n; if(m === 0) { return [ null, 0, v ]; } var h = r===n ? 3+(b-g)/m : (g===n ? 5+(r-b)/m : 1+(g-r)/m); return [ h===6?0:h, m/v, v ]; } function HSV_RGB(h, s, v) { if(h === null) { return [ v, v, v ]; } var i = Math.floor(h); var f = i%2 ? h-i : 1-(h-i); var m = v * (1 - s); var n = v * (1 - s*f); switch(i) { case 6: case 0: return [v,n,m]; case 1: return [n,v,m]; case 2: return [m,v,n]; case 3: return [m,n,v]; case 4: return [n,m,v]; case 5: return [v,m,n]; } } function removePicker() { delete jscolor.picker.owner; document.getElementsByTagName('body')[0].removeChild(jscolor.picker.boxB); } function drawPicker(x, y) { if(!jscolor.picker) { jscolor.picker = { box : document.createElement('div'), boxB : document.createElement('div'), pad : document.createElement('div'), padB : document.createElement('div'), padM : document.createElement('div'), sld : document.createElement('div'), sldB : document.createElement('div'), sldM : document.createElement('div'), btn : document.createElement('div'), btnS : document.createElement('span'), btnT : document.createTextNode(THIS.pickerCloseText) }; for(var i=0,segSize=4; i<jscolor.images.sld[1]; i+=segSize) { var seg = document.createElement('div'); seg.style.height = segSize+'px'; seg.style.fontSize = '1px'; seg.style.lineHeight = '0'; jscolor.picker.sld.appendChild(seg); } jscolor.picker.sldB.appendChild(jscolor.picker.sld); jscolor.picker.box.appendChild(jscolor.picker.sldB); jscolor.picker.box.appendChild(jscolor.picker.sldM); jscolor.picker.padB.appendChild(jscolor.picker.pad); jscolor.picker.box.appendChild(jscolor.picker.padB); jscolor.picker.box.appendChild(jscolor.picker.padM); jscolor.picker.btnS.appendChild(jscolor.picker.btnT); jscolor.picker.btn.appendChild(jscolor.picker.btnS); jscolor.picker.box.appendChild(jscolor.picker.btn); jscolor.picker.boxB.appendChild(jscolor.picker.box); } var p = jscolor.picker; // controls interaction p.box.onmouseup = p.box.onmouseout = function() { target.focus(); }; p.box.onmousedown = function() { abortBlur=true; }; p.box.onmousemove = function(e) { if (holdPad || holdSld) { holdPad && setPad(e); holdSld && setSld(e); if (document.selection) { document.selection.empty(); } else if (window.getSelection) { window.getSelection().removeAllRanges(); } dispatchImmediateChange(); } }; p.padM.onmouseup = p.padM.onmouseout = function() { if(holdPad) { holdPad=false; jscolor.fireEvent(valueElement,'change'); } }; p.padM.onmousedown = function(e) { // if the slider is at the bottom, move it up switch(modeID) { case 0: if (THIS.hsv[2] === 0) { THIS.fromHSV(null, null, 1.0); }; break; case 1: if (THIS.hsv[1] === 0) { THIS.fromHSV(null, 1.0, null); }; break; } holdPad=true; setPad(e); dispatchImmediateChange(); }; p.sldM.onmouseup = p.sldM.onmouseout = function() { if(holdSld) { holdSld=false; jscolor.fireEvent(valueElement,'change'); } }; p.sldM.onmousedown = function(e) { holdSld=true; setSld(e); dispatchImmediateChange(); }; // picker var dims = getPickerDims(THIS); p.box.style.width = dims[0] + 'px'; p.box.style.height = dims[1] + 'px'; // picker border p.boxB.style.position = 'absolute'; p.boxB.style.clear = 'both'; p.boxB.style.left = x+'px'; p.boxB.style.top = y+'px'; p.boxB.style.zIndex = THIS.pickerZIndex; p.boxB.style.border = THIS.pickerBorder+'px solid'; p.boxB.style.borderColor = THIS.pickerBorderColor; p.boxB.style.background = THIS.pickerFaceColor; // pad image p.pad.style.width = jscolor.images.pad[0]+'px'; p.pad.style.height = jscolor.images.pad[1]+'px'; // pad border p.padB.style.position = 'absolute'; p.padB.style.left = THIS.pickerFace+'px'; p.padB.style.top = THIS.pickerFace+'px'; p.padB.style.border = THIS.pickerInset+'px solid'; p.padB.style.borderColor = THIS.pickerInsetColor; // pad mouse area p.padM.style.position = 'absolute'; p.padM.style.left = '0'; p.padM.style.top = '0'; p.padM.style.width = THIS.pickerFace + 2*THIS.pickerInset + jscolor.images.pad[0] + jscolor.images.arrow[0] + 'px'; p.padM.style.height = p.box.style.height; p.padM.style.cursor = 'crosshair'; // slider image p.sld.style.overflow = 'hidden'; p.sld.style.width = jscolor.images.sld[0]+'px'; p.sld.style.height = jscolor.images.sld[1]+'px'; // slider border p.sldB.style.display = THIS.slider ? 'block' : 'none'; p.sldB.style.position = 'absolute'; p.sldB.style.right = THIS.pickerFace+'px'; p.sldB.style.top = THIS.pickerFace+'px'; p.sldB.style.border = THIS.pickerInset+'px solid'; p.sldB.style.borderColor = THIS.pickerInsetColor; // slider mouse area p.sldM.style.display = THIS.slider ? 'block' : 'none'; p.sldM.style.position = 'absolute'; p.sldM.style.right = '0'; p.sldM.style.top = '0'; p.sldM.style.width = jscolor.images.sld[0] + jscolor.images.arrow[0] + THIS.pickerFace + 2*THIS.pickerInset + 'px'; p.sldM.style.height = p.box.style.height; try { p.sldM.style.cursor = 'pointer'; } catch(eOldIE) { p.sldM.style.cursor = 'hand'; } // "close" button function setBtnBorder() { var insetColors = THIS.pickerInsetColor.split(/\s+/); var pickerOutsetColor = insetColors.length < 2 ? insetColors[0] : insetColors[1] + ' ' + insetColors[0] + ' ' + insetColors[0] + ' ' + insetColors[1]; p.btn.style.borderColor = pickerOutsetColor; } p.btn.style.display = THIS.pickerClosable ? 'block' : 'none'; p.btn.style.position = 'absolute'; p.btn.style.left = THIS.pickerFace + 'px'; p.btn.style.bottom = THIS.pickerFace + 'px'; p.btn.style.padding = '0 15px'; p.btn.style.height = '18px'; p.btn.style.border = THIS.pickerInset + 'px solid'; setBtnBorder(); p.btn.style.color = THIS.pickerButtonColor; p.btn.style.font = '12px sans-serif'; p.btn.style.textAlign = 'center'; try { p.btn.style.cursor = 'pointer'; } catch(eOldIE) { p.btn.style.cursor = 'hand'; } p.btn.onmousedown = function () { THIS.hidePicker(); }; p.btnS.style.lineHeight = p.btn.style.height; // load images in optimal order switch(modeID) { case 0: var padImg = 'hs.png'; break; case 1: var padImg = 'hv.png'; break; } p.padM.style.backgroundImage = "url('"+jscolor.getDir()+"cross.gif')"; p.padM.style.backgroundRepeat = "no-repeat"; p.sldM.style.backgroundImage = "url('"+jscolor.getDir()+"arrow.gif')"; p.sldM.style.backgroundRepeat = "no-repeat"; p.pad.style.backgroundImage = "url('"+jscolor.getDir()+padImg+"')"; p.pad.style.backgroundRepeat = "no-repeat"; p.pad.style.backgroundPosition = "0 0"; // place pointers redrawPad(); redrawSld(); jscolor.picker.owner = THIS; document.getElementsByTagName('body')[0].appendChild(p.boxB); } function getPickerDims(o) { var dims = [ 2*o.pickerInset + 2*o.pickerFace + jscolor.images.pad[0] + (o.slider ? 2*o.pickerInset + 2*jscolor.images.arrow[0] + jscolor.images.sld[0] : 0), o.pickerClosable ? 4*o.pickerInset + 3*o.pickerFace + jscolor.images.pad[1] + o.pickerButtonHeight : 2*o.pickerInset + 2*o.pickerFace + jscolor.images.pad[1] ]; return dims; } function redrawPad() { // redraw the pad pointer switch(modeID) { case 0: var yComponent = 1; break; case 1: var yComponent = 2; break; } var x = Math.round((THIS.hsv[0]/6) * (jscolor.images.pad[0]-1)); var y = Math.round((1-THIS.hsv[yComponent]) * (jscolor.images.pad[1]-1)); jscolor.picker.padM.style.backgroundPosition = (THIS.pickerFace+THIS.pickerInset+x - Math.floor(jscolor.images.cross[0]/2)) + 'px ' + (THIS.pickerFace+THIS.pickerInset+y - Math.floor(jscolor.images.cross[1]/2)) + 'px'; // redraw the slider image var seg = jscolor.picker.sld.childNodes; switch(modeID) { case 0: var rgb = HSV_RGB(THIS.hsv[0], THIS.hsv[1], 1); for(var i=0; i<seg.length; i+=1) { seg[i].style.backgroundColor = 'rgb('+ (rgb[0]*(1-i/seg.length)*100)+'%,'+ (rgb[1]*(1-i/seg.length)*100)+'%,'+ (rgb[2]*(1-i/seg.length)*100)+'%)'; } break; case 1: var rgb, s, c = [ THIS.hsv[2], 0, 0 ]; var i = Math.floor(THIS.hsv[0]); var f = i%2 ? THIS.hsv[0]-i : 1-(THIS.hsv[0]-i); switch(i) { case 6: case 0: rgb=[0,1,2]; break; case 1: rgb=[1,0,2]; break; case 2: rgb=[2,0,1]; break; case 3: rgb=[2,1,0]; break; case 4: rgb=[1,2,0]; break; case 5: rgb=[0,2,1]; break; } for(var i=0; i<seg.length; i+=1) { s = 1 - 1/(seg.length-1)*i; c[1] = c[0] * (1 - s*f); c[2] = c[0] * (1 - s); seg[i].style.backgroundColor = 'rgb('+ (c[rgb[0]]*100)+'%,'+ (c[rgb[1]]*100)+'%,'+ (c[rgb[2]]*100)+'%)'; } break; } } function redrawSld() { // redraw the slider pointer switch(modeID) { case 0: var yComponent = 2; break; case 1: var yComponent = 1; break; } var y = Math.round((1-THIS.hsv[yComponent]) * (jscolor.images.sld[1]-1)); jscolor.picker.sldM.style.backgroundPosition = '0 ' + (THIS.pickerFace+THIS.pickerInset+y - Math.floor(jscolor.images.arrow[1]/2)) + 'px'; } function isPickerOwner() { return jscolor.picker && jscolor.picker.owner === THIS; } function blurTarget() { if(valueElement === target) { THIS.importColor(); } if(THIS.pickerOnfocus) { THIS.hidePicker(); } } function blurValue() { if(valueElement !== target) { THIS.importColor(); } } function setPad(e) { var mpos = jscolor.getRelMousePos(e); var x = mpos.x - THIS.pickerFace - THIS.pickerInset; var y = mpos.y - THIS.pickerFace - THIS.pickerInset; switch(modeID) { case 0: THIS.fromHSV(x*(6/(jscolor.images.pad[0]-1)), 1 - y/(jscolor.images.pad[1]-1), null, leaveSld); break; case 1: THIS.fromHSV(x*(6/(jscolor.images.pad[0]-1)), null, 1 - y/(jscolor.images.pad[1]-1), leaveSld); break; } } function setSld(e) { var mpos = jscolor.getRelMousePos(e); var y = mpos.y - THIS.pickerFace - THIS.pickerInset; switch(modeID) { case 0: THIS.fromHSV(null, null, 1 - y/(jscolor.images.sld[1]-1), leavePad); break; case 1: THIS.fromHSV(null, 1 - y/(jscolor.images.sld[1]-1), null, leavePad); break; } } function dispatchImmediateChange() { if (THIS.onImmediateChange) { if (typeof THIS.onImmediateChange === 'string') { eval(THIS.onImmediateChange); } else { THIS.onImmediateChange(THIS); } } } var THIS = this; var modeID = this.pickerMode.toLowerCase()==='hvs' ? 1 : 0; var abortBlur = false; var valueElement = jscolor.fetchElement(this.valueElement), styleElement = jscolor.fetchElement(this.styleElement); var holdPad = false, holdSld = false; var leaveValue = 1<<0, leaveStyle = 1<<1, leavePad = 1<<2, leaveSld = 1<<3; // target jscolor.addEvent(target, 'focus', function() { if(THIS.pickerOnfocus) { THIS.showPicker(); } }); jscolor.addEvent(target, 'blur', function() { if(!abortBlur) { window.setTimeout(function(){ abortBlur || blurTarget(); abortBlur=false; }, 0); } else { abortBlur = false; } }); // valueElement if(valueElement) { var updateField = function() { THIS.fromString(valueElement.value, leaveValue); dispatchImmediateChange(); }; jscolor.addEvent(valueElement, 'keyup', updateField); jscolor.addEvent(valueElement, 'input', updateField); jscolor.addEvent(valueElement, 'blur', blurValue); valueElement.setAttribute('autocomplete', 'off'); } // styleElement if(styleElement) { styleElement.jscStyle = { backgroundImage : styleElement.style.backgroundImage, backgroundColor : styleElement.style.backgroundColor, color : styleElement.style.color }; } // require images switch(modeID) { case 0: jscolor.requireImage('hs.png'); break; case 1: jscolor.requireImage('hv.png'); break; } jscolor.requireImage('cross.gif'); jscolor.requireImage('arrow.gif'); this.importColor(); } }; jscolor.install();
JavaScript
/** $Id: domTT_drag.js 2315 2006-06-12 05:45:36Z dallen $ */ // {{{ license /* * Copyright 2002-2005 Dan Allen, Mojavelinux.com (dan.allen@mojavelinux.com) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ // }}} // {{{ globals (DO NOT EDIT) var domTT_dragEnabled = true; var domTT_currentDragTarget; var domTT_dragMouseDown; var domTT_dragOffsetLeft; var domTT_dragOffsetTop; // }}} // {{{ domTT_dragStart() function domTT_dragStart(in_this, in_event) { if (typeof(in_event) == 'undefined') { in_event = window.event; } var eventButton = in_event[domLib_eventButton]; if (eventButton != 1 && !domLib_isKHTML) { return; } domTT_currentDragTarget = in_this; in_this.style.cursor = 'move'; // upgrade our z-index in_this.style.zIndex = ++domLib_zIndex; var eventPosition = domLib_getEventPosition(in_event); var targetPosition = domLib_getOffsets(in_this); domTT_dragOffsetLeft = eventPosition.get('x') - targetPosition.get('left'); domTT_dragOffsetTop = eventPosition.get('y') - targetPosition.get('top'); domTT_dragMouseDown = true; } // }}} // {{{ domTT_dragUpdate() function domTT_dragUpdate(in_event) { if (domTT_dragMouseDown) { if (domLib_isGecko) { window.getSelection().removeAllRanges() } if (domTT_useGlobalMousePosition && domTT_mousePosition != null) { var eventPosition = domTT_mousePosition; } else { if (typeof(in_event) == 'undefined') { in_event = window.event; } var eventPosition = domLib_getEventPosition(in_event); } domTT_currentDragTarget.style.left = (eventPosition.get('x') - domTT_dragOffsetLeft) + 'px'; domTT_currentDragTarget.style.top = (eventPosition.get('y') - domTT_dragOffsetTop) + 'px'; // update the collision detection domLib_detectCollisions(domTT_currentDragTarget); } } // }}} // {{{ domTT_dragStop() function domTT_dragStop() { if (domTT_dragMouseDown) { domTT_dragMouseDown = false; domTT_currentDragTarget.style.cursor = 'default'; domTT_currentDragTarget = null; if (domLib_isGecko) { window.getSelection().removeAllRanges() } } } // }}}
JavaScript
/** $Id: domTT.js 2324 2006-06-12 07:06:39Z dallen $ */ // {{{ license /* * Copyright 2002-2005 Dan Allen, Mojavelinux.com (dan.allen@mojavelinux.com) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ // }}} // {{{ intro /** * Title: DOM Tooltip Library * Version: 0.7.3 * * Summary: * Allows developers to add custom tooltips to the webpages. Tooltips are * generated using the domTT_activate() function and customized by setting * a handful of options. * * Maintainer: Dan Allen <dan.allen@mojavelinux.com> * Contributors: * Josh Gross <josh@jportalhome.com> * Jason Rust <jason@rustyparts.com> * * License: Apache 2.0 * However, if you use this library, you earn the position of official bug * reporter :) Please post questions or problem reports to the newsgroup: * * http://groups-beta.google.com/group/dom-tooltip * * If you are doing this for commercial work, perhaps you could send me a few * Starbucks Coffee gift dollars or PayPal bucks to encourage future * developement (NOT REQUIRED). E-mail me for my snail mail address. * * Homepage: http://www.mojavelinux.com/projects/domtooltip/ * * Newsgroup: http://groups-beta.google.com/group/dom-tooltip * * Freshmeat Project: http://freshmeat.net/projects/domtt/?topic_id=92 * * Updated: 2005/07/16 * * Supported Browsers: * Mozilla (Gecko), IE 5.5+, IE on Mac, Safari, Konqueror, Opera 7 * * Usage: * Please see the HOWTO documentation. **/ // }}} // {{{ settings (editable) // IE mouse events seem to be off by 2 pixels var domTT_offsetX = (domLib_isIE ? -2 : 0); var domTT_offsetY = (domLib_isIE ? 4 : 2); var domTT_direction = 'southeast'; var domTT_mouseHeight = domLib_isIE ? 13 : 19; var domTT_closeLink = 'X'; var domTT_closeAction = 'hide'; var domTT_activateDelay = 500; var domTT_maxWidth = false; var domTT_styleClass = 'domTT'; var domTT_fade = 'neither'; var domTT_lifetime = 0; var domTT_grid = 0; var domTT_trailDelay = 200; var domTT_useGlobalMousePosition = true; var domTT_postponeActivation = false; var domTT_tooltipIdPrefix = '[domTT]'; var domTT_screenEdgeDetection = true; var domTT_screenEdgePadding = 4; var domTT_oneOnly = false; var domTT_cloneNodes = false; var domTT_detectCollisions = true; var domTT_bannedTags = ['OPTION']; var domTT_draggable = false; if (typeof(domTT_dragEnabled) == 'undefined') { domTT_dragEnabled = false; } // }}} // {{{ globals (DO NOT EDIT) var domTT_predefined = new Hash(); // tooltips are keyed on both the tip id and the owner id, // since events can originate on either object var domTT_tooltips = new Hash(); var domTT_lastOpened = 0; var domTT_documentLoaded = false; var domTT_mousePosition = null; // }}} // {{{ document.onmousemove if (domLib_useLibrary && domTT_useGlobalMousePosition) { document.onmousemove = function(in_event) { if (typeof(in_event) == 'undefined') { in_event = window.event; } domTT_mousePosition = domLib_getEventPosition(in_event); if (domTT_dragEnabled && domTT_dragMouseDown) { domTT_dragUpdate(in_event); } } } // }}} // {{{ domTT_activate() function domTT_activate(in_this, in_event) { if (!domLib_useLibrary || (domTT_postponeActivation && !domTT_documentLoaded)) { return false; } // make sure in_event is set (for IE, some cases we have to use window.event) if (typeof(in_event) == 'undefined') { in_event = window.event; } // don't allow tooltips on banned tags (such as OPTION) if (in_event != null) { var target = in_event.srcElement ? in_event.srcElement : in_event.target; if (target != null && (',' + domTT_bannedTags.join(',') + ',').indexOf(',' + target.tagName + ',') != -1) { return false; } } var owner = document.body; // we have an active event so get the owner if (in_event != null && in_event.type.match(/key|mouse|click|contextmenu/i)) { // make sure we have nothing higher than the body element if (in_this.nodeType && in_this.nodeType != document.DOCUMENT_NODE) { owner = in_this; } } // non active event (make sure we were passed a string id) else { if (typeof(in_this) != 'object' && !(owner = domTT_tooltips.get(in_this))) { // NOTE: two steps to avoid "flashing" in gecko var embryo = document.createElement('div'); owner = document.body.appendChild(embryo); owner.style.display = 'none'; owner.id = in_this; } } // make sure the owner has a unique id if (!owner.id) { owner.id = '__autoId' + domLib_autoId++; } // see if we should only be opening one tip at a time // NOTE: this is not "perfect" yet since it really steps on any other // tip working on fade out or delayed close, but it get's the job done if (domTT_oneOnly && domTT_lastOpened) { domTT_deactivate(domTT_lastOpened); } domTT_lastOpened = owner.id; var tooltip = domTT_tooltips.get(owner.id); if (tooltip) { if (tooltip.get('eventType') != in_event.type) { if (tooltip.get('type') == 'greasy') { tooltip.set('closeAction', 'destroy'); domTT_deactivate(owner.id); } else if (tooltip.get('status') != 'inactive') { return owner.id; } } else { if (tooltip.get('status') == 'inactive') { tooltip.set('status', 'pending'); tooltip.set('activateTimeout', domLib_setTimeout(domTT_runShow, tooltip.get('delay'), [owner.id, in_event])); return owner.id; } // either pending or active, let it be else { return owner.id; } } } // setup the default options hash var options = new Hash( 'caption', '', 'content', '', 'clearMouse', true, 'closeAction', domTT_closeAction, 'closeLink', domTT_closeLink, 'delay', domTT_activateDelay, 'direction', domTT_direction, 'draggable', domTT_draggable, 'fade', domTT_fade, 'fadeMax', 100, 'grid', domTT_grid, 'id', domTT_tooltipIdPrefix + owner.id, 'inframe', false, 'lifetime', domTT_lifetime, 'offsetX', domTT_offsetX, 'offsetY', domTT_offsetY, 'parent', document.body, 'position', 'absolute', 'styleClass', domTT_styleClass, 'type', 'greasy', 'trail', false, 'lazy', false ); // load in the options from the function call for (var i = 2; i < arguments.length; i += 2) { // load in predefined if (arguments[i] == 'predefined') { var predefinedOptions = domTT_predefined.get(arguments[i + 1]); for (var j in predefinedOptions.elementData) { options.set(j, predefinedOptions.get(j)); } } // set option else { options.set(arguments[i], arguments[i + 1]); } } options.set('eventType', in_event != null ? in_event.type : null); // immediately set the status text if provided if (options.has('statusText')) { try { window.status = options.get('statusText'); } catch(e) {} } // if we didn't give content...assume we just wanted to change the status and return if (!options.has('content') || options.get('content') == '' || options.get('content') == null) { if (typeof(owner.onmouseout) != 'function') { owner.onmouseout = function(in_event) { domTT_mouseout(this, in_event); }; } return owner.id; } options.set('owner', owner); domTT_create(options); // determine the show delay options.set('delay', (in_event != null && in_event.type.match(/click|mousedown|contextmenu/i)) ? 0 : parseInt(options.get('delay'))); domTT_tooltips.set(owner.id, options); domTT_tooltips.set(options.get('id'), options); options.set('status', 'pending'); options.set('activateTimeout', domLib_setTimeout(domTT_runShow, options.get('delay'), [owner.id, in_event])); return owner.id; } // }}} // {{{ domTT_create() function domTT_create(in_options) { var tipOwner = in_options.get('owner'); var parentObj = in_options.get('parent'); var parentDoc = parentObj.ownerDocument || parentObj.document; // create the tooltip and hide it // NOTE: two steps to avoid "flashing" in gecko var embryo = parentDoc.createElement('div'); var tipObj = parentObj.appendChild(embryo); tipObj.style.position = 'absolute'; tipObj.style.left = '0px'; tipObj.style.top = '0px'; tipObj.style.visibility = 'hidden'; tipObj.id = in_options.get('id'); tipObj.className = in_options.get('styleClass'); var contentBlock; var tableLayout = false; if (in_options.get('caption') || (in_options.get('type') == 'sticky' && in_options.get('caption') !== false)) { tableLayout = true; // layout the tip with a hidden formatting table var tipLayoutTable = tipObj.appendChild(parentDoc.createElement('table')); tipLayoutTable.style.borderCollapse = 'collapse'; if (domLib_isKHTML) { tipLayoutTable.cellSpacing = 0; } var tipLayoutTbody = tipLayoutTable.appendChild(parentDoc.createElement('tbody')); var numCaptionCells = 0; var captionRow = tipLayoutTbody.appendChild(parentDoc.createElement('tr')); var captionCell = captionRow.appendChild(parentDoc.createElement('td')); captionCell.style.padding = '0px'; var caption = captionCell.appendChild(parentDoc.createElement('div')); caption.className = 'caption'; if (domLib_isIE50) { caption.style.height = '100%'; } if (in_options.get('caption').nodeType) { caption.appendChild(domTT_cloneNodes ? in_options.get('caption').cloneNode(1) : in_options.get('caption')); } else { caption.innerHTML = in_options.get('caption'); } if (in_options.get('type') == 'sticky') { var numCaptionCells = 2; var closeLinkCell = captionRow.appendChild(parentDoc.createElement('td')); closeLinkCell.style.padding = '0px'; var closeLink = closeLinkCell.appendChild(parentDoc.createElement('div')); closeLink.className = 'caption'; if (domLib_isIE50) { closeLink.style.height = '100%'; } closeLink.style.textAlign = 'right'; closeLink.style.cursor = domLib_stylePointer; // merge the styles of the two cells closeLink.style.borderLeftWidth = caption.style.borderRightWidth = '0px'; closeLink.style.paddingLeft = caption.style.paddingRight = '0px'; closeLink.style.marginLeft = caption.style.marginRight = '0px'; if (in_options.get('closeLink').nodeType) { closeLink.appendChild(in_options.get('closeLink').cloneNode(1)); } else { closeLink.innerHTML = in_options.get('closeLink'); } closeLink.onclick = function() { domTT_deactivate(tipOwner.id); }; closeLink.onmousedown = function(in_event) { if (typeof(in_event) == 'undefined') { in_event = window.event; } in_event.cancelBubble = true; }; // MacIE has to have a newline at the end and must be made with createTextNode() if (domLib_isMacIE) { closeLinkCell.appendChild(parentDoc.createTextNode("\n")); } } // MacIE has to have a newline at the end and must be made with createTextNode() if (domLib_isMacIE) { captionCell.appendChild(parentDoc.createTextNode("\n")); } var contentRow = tipLayoutTbody.appendChild(parentDoc.createElement('tr')); var contentCell = contentRow.appendChild(parentDoc.createElement('td')); contentCell.style.padding = '0px'; if (numCaptionCells) { if (domLib_isIE || domLib_isOpera) { contentCell.colSpan = numCaptionCells; } else { contentCell.setAttribute('colspan', numCaptionCells); } } contentBlock = contentCell.appendChild(parentDoc.createElement('div')); if (domLib_isIE50) { contentBlock.style.height = '100%'; } } else { contentBlock = tipObj.appendChild(parentDoc.createElement('div')); } contentBlock.className = 'contents'; var content = in_options.get('content'); // allow content has a function to return the actual content if (typeof(content) == 'function') { content = content(in_options.get('id')); } if (content != null && content.nodeType) { contentBlock.appendChild(domTT_cloneNodes ? content.cloneNode(1) : content); } else { contentBlock.innerHTML = content; } // adjust the width if specified if (in_options.has('width')) { tipObj.style.width = parseInt(in_options.get('width')) + 'px'; } // check if we are overridding the maxWidth // if the browser supports maxWidth, the global setting will be ignored (assume stylesheet) var maxWidth = domTT_maxWidth; if (in_options.has('maxWidth')) { if ((maxWidth = in_options.get('maxWidth')) === false) { tipObj.style.maxWidth = domLib_styleNoMaxWidth; } else { maxWidth = parseInt(in_options.get('maxWidth')); tipObj.style.maxWidth = maxWidth + 'px'; } } // HACK: fix lack of maxWidth in CSS for KHTML and IE if (maxWidth !== false && (domLib_isIE || domLib_isKHTML) && tipObj.offsetWidth > maxWidth) { tipObj.style.width = maxWidth + 'px'; } in_options.set('offsetWidth', tipObj.offsetWidth); in_options.set('offsetHeight', tipObj.offsetHeight); // konqueror miscalcuates the width of the containing div when using the layout table based on the // border size of the containing div if (domLib_isKonq && tableLayout && !tipObj.style.width) { var left = document.defaultView.getComputedStyle(tipObj, '').getPropertyValue('border-left-width'); var right = document.defaultView.getComputedStyle(tipObj, '').getPropertyValue('border-right-width'); left = left.substring(left.indexOf(':') + 2, left.indexOf(';')); right = right.substring(right.indexOf(':') + 2, right.indexOf(';')); var correction = 2 * ((left ? parseInt(left) : 0) + (right ? parseInt(right) : 0)); tipObj.style.width = (tipObj.offsetWidth - correction) + 'px'; } // if a width is not set on an absolutely positioned object, both IE and Opera // will attempt to wrap when it spills outside of body...we cannot have that if (domLib_isIE || domLib_isOpera) { if (!tipObj.style.width) { // HACK: the correction here is for a border tipObj.style.width = (tipObj.offsetWidth - 2) + 'px'; } // HACK: the correction here is for a border tipObj.style.height = (tipObj.offsetHeight - 2) + 'px'; } // store placement offsets from event position var offsetX, offsetY; // tooltip floats if (in_options.get('position') == 'absolute' && !(in_options.has('x') && in_options.has('y'))) { // determine the offset relative to the pointer switch (in_options.get('direction')) { case 'northeast': offsetX = in_options.get('offsetX'); offsetY = 0 - tipObj.offsetHeight - in_options.get('offsetY'); break; case 'northwest': offsetX = 0 - tipObj.offsetWidth - in_options.get('offsetX'); offsetY = 0 - tipObj.offsetHeight - in_options.get('offsetY'); break; case 'north': offsetX = 0 - parseInt(tipObj.offsetWidth/2); offsetY = 0 - tipObj.offsetHeight - in_options.get('offsetY'); break; case 'southwest': offsetX = 0 - tipObj.offsetWidth - in_options.get('offsetX'); offsetY = in_options.get('offsetY'); break; case 'southeast': offsetX = in_options.get('offsetX'); offsetY = in_options.get('offsetY'); break; case 'south': offsetX = 0 - parseInt(tipObj.offsetWidth/2); offsetY = in_options.get('offsetY'); break; } // if we are in an iframe, get the offsets of the iframe in the parent document if (in_options.get('inframe')) { var iframeObj = domLib_getIFrameReference(window); if (iframeObj) { var frameOffsets = domLib_getOffsets(iframeObj); offsetX += frameOffsets.get('left'); offsetY += frameOffsets.get('top'); } } } // tooltip is fixed else { offsetX = 0; offsetY = 0; in_options.set('trail', false); } // set the direction-specific offsetX/Y in_options.set('offsetX', offsetX); in_options.set('offsetY', offsetY); if (in_options.get('clearMouse') && in_options.get('direction').indexOf('south') != -1) { in_options.set('mouseOffset', domTT_mouseHeight); } else { in_options.set('mouseOffset', 0); } if (domLib_canFade && typeof(Fadomatic) == 'function') { if (in_options.get('fade') != 'neither') { var fadeHandler = new Fadomatic(tipObj, 10, 0, 0, in_options.get('fadeMax')); in_options.set('fadeHandler', fadeHandler); } } else { in_options.set('fade', 'neither'); } // setup mouse events if (in_options.get('trail') && typeof(tipOwner.onmousemove) != 'function') { tipOwner.onmousemove = function(in_event) { domTT_mousemove(this, in_event); }; } if (typeof(tipOwner.onmouseout) != 'function') { tipOwner.onmouseout = function(in_event) { domTT_mouseout(this, in_event); }; } if (in_options.get('type') == 'sticky') { if (in_options.get('position') == 'absolute' && domTT_dragEnabled && in_options.get('draggable')) { if (domLib_isIE) { captionRow.onselectstart = function() { return false; }; } // setup drag captionRow.onmousedown = function(in_event) { domTT_dragStart(tipObj, in_event); }; captionRow.onmousemove = function(in_event) { domTT_dragUpdate(in_event); }; captionRow.onmouseup = function() { domTT_dragStop(); }; } } else if (in_options.get('type') == 'velcro') { /* can use once we have deactivateDelay tipObj.onmouseover = function(in_event) { if (typeof(in_event) == 'undefined') { in_event = window.event; } var tooltip = domTT_tooltips.get(tipObj.id); if (in_options.get('lifetime')) { domLib_clearTimeout(in_options.get('lifetimeTimeout'); } }; */ tipObj.onmouseout = function(in_event) { if (typeof(in_event) == 'undefined') { in_event = window.event; } if (!domLib_isDescendantOf(in_event[domLib_eventTo], tipObj, domTT_bannedTags)) { domTT_deactivate(tipOwner.id); } }; // NOTE: this might interfere with links in the tip tipObj.onclick = function(in_event) { domTT_deactivate(tipOwner.id); }; } if (in_options.get('position') == 'relative') { tipObj.style.position = 'relative'; } in_options.set('node', tipObj); in_options.set('status', 'inactive'); } // }}} // {{{ domTT_show() // in_id is either tip id or the owner id function domTT_show(in_id, in_event) { // should always find one since this call would be cancelled if tip was killed var tooltip = domTT_tooltips.get(in_id); var status = tooltip.get('status'); var tipObj = tooltip.get('node'); if (tooltip.get('position') == 'absolute') { var mouseX, mouseY; if (tooltip.has('x') && tooltip.has('y')) { mouseX = tooltip.get('x'); mouseY = tooltip.get('y'); } else if (!domTT_useGlobalMousePosition || domTT_mousePosition == null || status == 'active' || tooltip.get('delay') == 0) { var eventPosition = domLib_getEventPosition(in_event); var eventX = eventPosition.get('x'); var eventY = eventPosition.get('y'); if (tooltip.get('inframe')) { eventX -= eventPosition.get('scrollX'); eventY -= eventPosition.get('scrollY'); } // only move tip along requested trail axis when updating position if (status == 'active' && tooltip.get('trail') !== true) { var trail = tooltip.get('trail'); if (trail == 'x') { mouseX = eventX; mouseY = tooltip.get('mouseY'); } else if (trail == 'y') { mouseX = tooltip.get('mouseX'); mouseY = eventY; } } else { mouseX = eventX; mouseY = eventY; } } else { mouseX = domTT_mousePosition.get('x'); mouseY = domTT_mousePosition.get('y'); if (tooltip.get('inframe')) { mouseX -= domTT_mousePosition.get('scrollX'); mouseY -= domTT_mousePosition.get('scrollY'); } } // we are using a grid for updates if (tooltip.get('grid')) { // if this is not a mousemove event or it is a mousemove event on an active tip and // the movement is bigger than the grid if (in_event.type != 'mousemove' || (status == 'active' && (Math.abs(tooltip.get('lastX') - mouseX) > tooltip.get('grid') || Math.abs(tooltip.get('lastY') - mouseY) > tooltip.get('grid')))) { tooltip.set('lastX', mouseX); tooltip.set('lastY', mouseY); } // did not satisfy the grid movement requirement else { return false; } } // mouseX and mouseY store the last acknowleged mouse position, // good for trailing on one axis tooltip.set('mouseX', mouseX); tooltip.set('mouseY', mouseY); var coordinates; if (domTT_screenEdgeDetection) { coordinates = domTT_correctEdgeBleed( tooltip.get('offsetWidth'), tooltip.get('offsetHeight'), mouseX, mouseY, tooltip.get('offsetX'), tooltip.get('offsetY'), tooltip.get('mouseOffset'), tooltip.get('inframe') ? window.parent : window ); } else { coordinates = { 'x' : mouseX + tooltip.get('offsetX'), 'y' : mouseY + tooltip.get('offsetY') + tooltip.get('mouseOffset') }; } // update the position tipObj.style.left = coordinates.x + 'px'; tipObj.style.top = coordinates.y + 'px'; // increase the tip zIndex so it goes over previously shown tips tipObj.style.zIndex = domLib_zIndex++; } // if tip is not active, active it now and check for a fade in if (status == 'pending') { // unhide the tooltip tooltip.set('status', 'active'); tipObj.style.display = ''; tipObj.style.visibility = 'visible'; var fade = tooltip.get('fade'); if (fade != 'neither') { var fadeHandler = tooltip.get('fadeHandler'); if (fade == 'out' || fade == 'both') { fadeHandler.haltFade(); if (fade == 'out') { fadeHandler.halt(); } } if (fade == 'in' || fade == 'both') { fadeHandler.fadeIn(); } } if (tooltip.get('type') == 'greasy' && tooltip.get('lifetime') != 0) { tooltip.set('lifetimeTimeout', domLib_setTimeout(domTT_runDeactivate, tooltip.get('lifetime'), [tipObj.id])); } } if (tooltip.get('position') == 'absolute' && domTT_detectCollisions) { // utilize original collision element cache domLib_detectCollisions(tipObj, false, true); } } // }}} // {{{ domTT_close() // in_handle can either be an child object of the tip, the tip id or the owner id function domTT_close(in_handle) { var id; if (typeof(in_handle) == 'object' && in_handle.nodeType) { var obj = in_handle; while (!obj.id || !domTT_tooltips.get(obj.id)) { obj = obj.parentNode; if (obj.nodeType != document.ELEMENT_NODE) { return; } } id = obj.id; } else { id = in_handle; } domTT_deactivate(id); } // }}} // {{{ domTT_closeAll() // run through the tooltips and close them all function domTT_closeAll() { // NOTE: this will iterate 2x # of tooltips for (var id in domTT_tooltips.elementData) { domTT_close(id); } } // }}} // {{{ domTT_deactivate() // in_id is either the tip id or the owner id function domTT_deactivate(in_id) { var tooltip = domTT_tooltips.get(in_id); if (tooltip) { var status = tooltip.get('status'); if (status == 'pending') { // cancel the creation of this tip if it is still pending domLib_clearTimeout(tooltip.get('activateTimeout')); tooltip.set('status', 'inactive'); } else if (status == 'active') { if (tooltip.get('lifetime')) { domLib_clearTimeout(tooltip.get('lifetimeTimeout')); } var tipObj = tooltip.get('node'); if (tooltip.get('closeAction') == 'hide') { var fade = tooltip.get('fade'); if (fade != 'neither') { var fadeHandler = tooltip.get('fadeHandler'); if (fade == 'out' || fade == 'both') { fadeHandler.fadeOut(); } else { fadeHandler.hide(); } } else { tipObj.style.display = 'none'; } } else { tooltip.get('parent').removeChild(tipObj); domTT_tooltips.remove(tooltip.get('owner').id); domTT_tooltips.remove(tooltip.get('id')); } tooltip.set('status', 'inactive'); if (domTT_detectCollisions) { // unhide all of the selects that are owned by this object // utilize original collision element cache domLib_detectCollisions(tipObj, true, true); } } } } // }}} // {{{ domTT_mouseout() function domTT_mouseout(in_owner, in_event) { if (!domLib_useLibrary) { return false; } if (typeof(in_event) == 'undefined') { in_event = window.event; } var toChild = domLib_isDescendantOf(in_event[domLib_eventTo], in_owner, domTT_bannedTags); var tooltip = domTT_tooltips.get(in_owner.id); if (tooltip && (tooltip.get('type') == 'greasy' || tooltip.get('status') != 'active')) { // deactivate tip if exists and we moved away from the owner if (!toChild) { domTT_deactivate(in_owner.id); try { window.status = window.defaultStatus; } catch(e) {} } } else if (!toChild) { try { window.status = window.defaultStatus; } catch(e) {} } } // }}} // {{{ domTT_mousemove() function domTT_mousemove(in_owner, in_event) { if (!domLib_useLibrary) { return false; } if (typeof(in_event) == 'undefined') { in_event = window.event; } var tooltip = domTT_tooltips.get(in_owner.id); if (tooltip && tooltip.get('trail') && tooltip.get('status') == 'active') { // see if we are trailing lazy if (tooltip.get('lazy')) { domLib_setTimeout(domTT_runShow, domTT_trailDelay, [in_owner.id, in_event]); } else { domTT_show(in_owner.id, in_event); } } } // }}} // {{{ domTT_addPredefined() function domTT_addPredefined(in_id) { var options = new Hash(); for (var i = 1; i < arguments.length; i += 2) { options.set(arguments[i], arguments[i + 1]); } domTT_predefined.set(in_id, options); } // }}} // {{{ domTT_correctEdgeBleed() function domTT_correctEdgeBleed(in_width, in_height, in_x, in_y, in_offsetX, in_offsetY, in_mouseOffset, in_window) { var win, doc; var bleedRight, bleedBottom; var pageHeight, pageWidth, pageYOffset, pageXOffset; var x = in_x + in_offsetX; var y = in_y + in_offsetY + in_mouseOffset; win = (typeof(in_window) == 'undefined' ? window : in_window); // Gecko and IE swaps values of clientHeight, clientWidth properties when // in standards compliance mode from documentElement to document.body doc = ((domLib_standardsMode && (domLib_isIE || domLib_isGecko)) ? win.document.documentElement : win.document.body); // for IE in compliance mode if (domLib_isIE) { pageHeight = doc.clientHeight; pageWidth = doc.clientWidth; pageYOffset = doc.scrollTop; pageXOffset = doc.scrollLeft; } else { pageHeight = doc.clientHeight; pageWidth = doc.clientWidth; if (domLib_isKHTML) { pageHeight = win.innerHeight; } pageYOffset = win.pageYOffset; pageXOffset = win.pageXOffset; } // we are bleeding off the right, move tip over to stay on page // logic: take x position, add width and subtract from effective page width if ((bleedRight = (x - pageXOffset) + in_width - (pageWidth - domTT_screenEdgePadding)) > 0) { x -= bleedRight; } // we are bleeding to the left, move tip over to stay on page // if tip doesn't fit, we will go back to bleeding off the right // logic: take x position and check if less than edge padding if ((x - pageXOffset) < domTT_screenEdgePadding) { x = domTT_screenEdgePadding + pageXOffset; } // if we are bleeding off the bottom, flip to north // logic: take y position, add height and subtract from effective page height if ((bleedBottom = (y - pageYOffset) + in_height - (pageHeight - domTT_screenEdgePadding)) > 0) { y = in_y - in_height - in_offsetY; } // if we are bleeding off the top, flip to south // if tip doesn't fit, we will go back to bleeding off the bottom // logic: take y position and check if less than edge padding if ((y - pageYOffset) < domTT_screenEdgePadding) { y = in_y + domTT_mouseHeight + in_offsetY; } return {'x' : x, 'y' : y}; } // }}} // {{{ domTT_isActive() // in_id is either the tip id or the owner id function domTT_isActive(in_id) { var tooltip = domTT_tooltips.get(in_id); if (!tooltip || tooltip.get('status') != 'active') { return false; } else { return true; } } // }}} // {{{ domTT_runXXX() // All of these domMenu_runXXX() methods are used by the event handling sections to // avoid the circular memory leaks caused by inner functions function domTT_runDeactivate(args) { domTT_deactivate(args[0]); } function domTT_runShow(args) { domTT_show(args[0], args[1]); } // }}} // {{{ domTT_replaceTitles() function domTT_replaceTitles(in_decorator) { var elements = domLib_getElementsByClass('tooltip'); for (var i = 0; i < elements.length; i++) { if (elements[i].title) { var content; if (typeof(in_decorator) == 'function') { content = in_decorator(elements[i]); } else { content = elements[i].title; } content = content.replace(new RegExp('\'', 'g'), '\\\''); elements[i].onmouseover = new Function('in_event', "domTT_activate(this, in_event, 'content', '" + content + "')"); elements[i].title = ''; } } } // }}} // {{{ domTT_update() // Allow authors to update the contents of existing tips using the DOM // Unfortunately, the tip must already exist, or else no work is done. // TODO: make getting at content or caption cleaner function domTT_update(handle, content, type) { // type defaults to 'content', can also be 'caption' if (typeof(type) == 'undefined') { type = 'content'; } var tip = domTT_tooltips.get(handle); if (!tip) { return; } var tipObj = tip.get('node'); var updateNode; if (type == 'content') { // <div class="contents">... updateNode = tipObj.firstChild; if (updateNode.className != 'contents') { // <table><tbody><tr>...</tr><tr><td><div class="contents">... updateNode = updateNode.firstChild.firstChild.nextSibling.firstChild.firstChild; } } else { updateNode = tipObj.firstChild; if (updateNode.className == 'contents') { // missing caption return; } // <table><tbody><tr><td><div class="caption">... updateNode = updateNode.firstChild.firstChild.firstChild.firstChild; } // TODO: allow for a DOM node as content updateNode.innerHTML = content; } // }}}
JavaScript
$(function(){ var IsbrowserUpgrade = 0; if(IsbrowserUpgrade!=1){ browserUpgrade = '<div class="lteie6_transparent"></div>'; browserUpgrade +='<div class="lteie6_main">'; browserUpgrade += '<h2 class="lteie6_title" title="反Internet Explorer 6"><span>反Internet Explorer 6</span></h2>'; browserUpgrade += '<p class="lteie6_cont">为推动浏览器的W3C标准及更好的用户体验,本站强烈建议你使用<a target="_blank" title="下载Chrome" href="http://www.google.com/chrome/">Google Chrome</a>或安装/使用下列新版本浏览器,在此感激你为推动互联网作出贡献。</p>'; browserUpgrade += '<ul class="lteie6_browser">'; browserUpgrade += '<li><a class="ie8" title="下载Internet Explorer 8" href="http://www.microsoft.com/windows/internet-explorer/beta/worldwide-sites.aspx">Internet Explorer 8</a></li>'; browserUpgrade += '<li><a class="firefox" target="_blank" title="下载Firefox" href="http://www.mozillaonline.com/">Firefox</a></li>'; browserUpgrade += '<li><a class="opera" target="_blank" title="下载Opera" href="http://cn.opera.com/download/thanks/win/">Opera</a></li>'; browserUpgrade += '<li><a class="safari" target="_blank" title="下载Safari" href="http://www.apple.com.cn/safari/download/">Safari</a></li>'; browserUpgrade += '</ul>'; browserUpgrade += '<p class="more"><a class="link" title="详细活动信息" href="http://www.webrebuild.org/">活动详细<strong class="support"><span class="em">web</span><span class="strong">rebuild.</span><span class="important">org</span></strong></a></p>'; browserUpgrade += '<p class="close"></p>'; browserUpgrade +='</div>'; browserUpgrade +='<style type="text/css">'; browserUpgrade +='body{height:100%;}'; browserUpgrade +='.lteie6_transparent{position:absolute;top:0;left:0;width:100%;height:100%;background:#000000;filter:alpha(opacity=100);opacity: 0.2;}'; browserUpgrade +='.lteie6_main *{margin:0;padding:0;border:none; font-family:Verdana,"宋体";}'; browserUpgrade +='.lteie6_main .lteie6_title,'; browserUpgrade +='.lteie6_main .ie8,'; browserUpgrade +='.lteie6_main .firefox,'; browserUpgrade +='.lteie6_main .chrome,'; browserUpgrade +='.lteie6_main .opera,'; browserUpgrade +='.lteie6_main .safari,'; browserUpgrade +='.lteie6_main .close{padding-left:19px;background:url(http://www.webrebuild.org/browser_upgrade/img/lte_ie6.png) no-repeat;}'; browserUpgrade +='.lteie6_main .close span,'; browserUpgrade +='.lteie6_main .lteie6_title span{display:none}'; browserUpgrade +='.lteie6_main{position:absolute;top:50%;left:50%;margin:-80px 0 0 -250px;border:4px solid #1D6120;width:500px;height:185px;background:#FFFFFF;}'; browserUpgrade +='.lteie6_main .lteie6_title{float:left;display:inline;margin:20px;padding:0;width:155px;height:86px;}'; browserUpgrade +='.lteie6_main .lteie6_cont{float:left;margin-top:20px;width:290px;font:12px/200% Verdana!important;text-align:left;color:#5B5B5B;}'; browserUpgrade +='.lteie6_main .lteie6_cont a{color:#000; padding:2px 2px 2px 2px;}'; browserUpgrade +='.lteie6_main .lteie6_browser{position:absolute;top:105px;left:0;}'; browserUpgrade +='.lteie6_main .lteie6_browser li{display:inline;padding-left:18px;}'; browserUpgrade +='.lteie6_main .lteie6_browser a{display:inline-block;text-decoration:underline;font:12px/18px Verdana;color:#5B5B5B;padding-left:40px;height:40px;line-height:40px;}'; browserUpgrade +='.lteie6_main .lteie6_browser a:hover{color:#1D6120;}'; browserUpgrade +='.lteie6_main .ie8{background-position:-0px -120px;}'; browserUpgrade +='.lteie6_main .firefox{background-position:0 -160px;;}'; browserUpgrade +='.lteie6_main .chrome{background-position:0 -280px;}'; browserUpgrade +='.lteie6_main .opera{background-position:0 -200px;}'; browserUpgrade +='.lteie6_main .safari{background-position:0 -240px;}'; browserUpgrade +='.lteie6_main .close{position:absolute;top:4px;right:4px;padding:0;overflow:hidden;border:none;line-height:50px;width:14px;height:14px;font-size:0;cursor:pointer;background-position:-158px -93px;}'; browserUpgrade +='.lteie6_main .close button{width:14px;height:14px;background:1px solid #f00;cursor:pointer;}'; browserUpgrade +='.lteie6_main .more{position:absolute;top:162px;right:6px; font-size:11px;font-family:Verdana}'; browserUpgrade +='.lteie6_main .more .link{color:#5B5B5B;}'; browserUpgrade +='.lteie6_main .more .support span{font-weight:bold;}'; browserUpgrade +='.lteie6_main .more .em{color:#9FE222;}'; browserUpgrade +='.lteie6_main .more .strong{color:#1D6120;}'; browserUpgrade +='.lteie6_main .more .important{color:#5B5B5B;}'; browserUpgrade +='</style>'; var browserUpgradeContainer = document.createElement("div"); browserUpgradeContainer.id='browserUpgrade'; browserUpgradeContainer.className='lte_ie6'; browserUpgradeContainer.innerHTML=browserUpgrade; var browserUpgradeCloser = document.createElement("button"); browserUpgradeCloser.onclick=function(){document.getElementById('browserUpgrade').style.display='none';} browserUpgradeCloser.innerHTML='关闭'; browserUpgradeContainer.getElementsByTagName('p')[2].appendChild(browserUpgradeCloser); document.body.appendChild(browserUpgradeContainer); } });
JavaScript
/** * jQuery JSON Plugin * version: 2.3 (2011-09-17) * * This document is licensed as free software under the terms of the * MIT License: http://www.opensource.org/licenses/mit-license.php * * Brantley Harris wrote this plugin. It is based somewhat on the JSON.org * website's http://www.json.org/json2.js, which proclaims: * "NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.", a sentiment that * I uphold. * * It is also influenced heavily by MochiKit's serializeJSON, which is * copyrighted 2005 by Bob Ippolito. */ (function( $ ) { var escapeable = /["\\\x00-\x1f\x7f-\x9f]/g, meta = { '\b': '\\b', '\t': '\\t', '\n': '\\n', '\f': '\\f', '\r': '\\r', '"' : '\\"', '\\': '\\\\' }; /** * jQuery.toJSON * Converts the given argument into a JSON respresentation. * * @param o {Mixed} The json-serializble *thing* to be converted * * If an object has a toJSON prototype, that will be used to get the representation. * Non-integer/string keys are skipped in the object, as are keys that point to a * function. * */ $.toJSON = typeof JSON === 'object' && JSON.stringify ? JSON.stringify : function( o ) { if ( o === null ) { return 'null'; } var type = typeof o; if ( type === 'undefined' ) { return undefined; } if ( type === 'number' || type === 'boolean' ) { return '' + o; } if ( type === 'string') { return $.quoteString( o ); } if ( type === 'object' ) { if ( typeof o.toJSON === 'function' ) { return $.toJSON( o.toJSON() ); } if ( o.constructor === Date ) { var month = o.getUTCMonth() + 1, day = o.getUTCDate(), year = o.getUTCFullYear(), hours = o.getUTCHours(), minutes = o.getUTCMinutes(), seconds = o.getUTCSeconds(), milli = o.getUTCMilliseconds(); if ( month < 10 ) { month = '0' + month; } if ( day < 10 ) { day = '0' + day; } if ( hours < 10 ) { hours = '0' + hours; } if ( minutes < 10 ) { minutes = '0' + minutes; } if ( seconds < 10 ) { seconds = '0' + seconds; } if ( milli < 100 ) { milli = '0' + milli; } if ( milli < 10 ) { milli = '0' + milli; } return '"' + year + '-' + month + '-' + day + 'T' + hours + ':' + minutes + ':' + seconds + '.' + milli + 'Z"'; } if ( o.constructor === Array ) { var ret = []; for ( var i = 0; i < o.length; i++ ) { ret.push( $.toJSON( o[i] ) || 'null' ); } return '[' + ret.join(',') + ']'; } var name, val, pairs = []; for ( var k in o ) { type = typeof k; if ( type === 'number' ) { name = '"' + k + '"'; } else if (type === 'string') { name = $.quoteString(k); } else { // Keys must be numerical or string. Skip others continue; } type = typeof o[k]; if ( type === 'function' || type === 'undefined' ) { // Invalid values like these return undefined // from toJSON, however those object members // shouldn't be included in the JSON string at all. continue; } val = $.toJSON( o[k] ); pairs.push( name + ':' + val ); } return '{' + pairs.join( ',' ) + '}'; } }; /** * jQuery.evalJSON * Evaluates a given piece of json source. * * @param src {String} */ $.evalJSON = typeof JSON === 'object' && JSON.parse ? JSON.parse : function( src ) { return eval('(' + src + ')'); }; /** * jQuery.secureEvalJSON * Evals JSON in a way that is *more* secure. * * @param src {String} */ $.secureEvalJSON = typeof JSON === 'object' && JSON.parse ? JSON.parse : function( src ) { var filtered = src .replace( /\\["\\\/bfnrtu]/g, '@' ) .replace( /"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, ']') .replace( /(?:^|:|,)(?:\s*\[)+/g, ''); if ( /^[\],:{}\s]*$/.test( filtered ) ) { return eval( '(' + src + ')' ); } else { throw new SyntaxError( 'Error parsing JSON, source is not valid.' ); } }; /** * jQuery.quoteString * Returns a string-repr of a string, escaping quotes intelligently. * Mostly a support function for toJSON. * Examples: * >>> jQuery.quoteString('apple') * "apple" * * >>> jQuery.quoteString('"Where are we going?", she asked.') * "\"Where are we going?\", she asked." */ $.quoteString = function( string ) { if ( string.match( escapeable ) ) { return '"' + string.replace( escapeable, function( a ) { var c = meta[a]; if ( typeof c === 'string' ) { return c; } c = a.charCodeAt(); return '\\u00' + Math.floor(c / 16).toString(16) + (c % 16).toString(16); }) + '"'; } return '"' + string + '"'; }; })( jQuery );
JavaScript
alert('plugin one nested js file');
JavaScript
alert('win sauce');
JavaScript
alert('I am a root level file!');
JavaScript
alert("Test App");
JavaScript
nested theme js file
JavaScript
root theme js file
JavaScript
function removeHtmlTag(strx,chop){ if(strx.indexOf("<")!=-1) { var s = strx.split("<"); for(var i=0;i<s.length;i++){ if(s[i].indexOf(">")!=-1){ s[i] = s[i].substring(s[i].indexOf(">")+1,s[i].length); } } strx = s.join(""); } chop = (chop < strx.length-1) ? chop : strx.length-2; while(strx.charAt(chop-1)!=' ' && strx.indexOf(' ',chop)!=-1) chop++; strx = strx.substring(0,chop-1); return strx+'...'; } function createSummaryAndThumb(pID){ var div = document.getElementById(pID); var imgtag = ""; var img = div.getElementsByTagName("img"); var summ = summary_noimg; if(img.length>=1) { imgtag = '<center><img src="'+img[0].src+'" width="'+img_thumb_width+'px" height="'+img_thumb_height+'px"/></center>'; summ = summary_img; } var summary = imgtag + '<div>' + '</div>'; div.innerHTML = summary; }
JavaScript
//////////////////////////////////////////////////////////////////////////////// // // ADOBE SYSTEMS INCORPORATED // Copyright 2006-2008 Adobe Systems Incorporated // All Rights Reserved. // // NOTICE: Adobe permits you to use, modify, and distribute this file // in accordance with the terms of the license agreement accompanying it. // //////////////////////////////////////////////////////////////////////////////// var ECLIPSE_FRAME_NAME = "ContentViewFrame"; var eclipseBuild = false; var liveDocsBaseUrl = "http://livedocs.adobe.com/flex/3"; var liveDocsBookName = "langref"; function findObject(objId) { if (document.getElementById) return document.getElementById(objId); if (document.all) return document.all[objId]; } function isEclipse() { return eclipseBuild; // return (window.name == ECLIPSE_FRAME_NAME) || (parent.name == ECLIPSE_FRAME_NAME) || (parent.parent.name == ECLIPSE_FRAME_NAME); } function configPage() { setRowColorsInitial(true, "Property"); setRowColorsInitial(true, "Method"); setRowColorsInitial(true, "ProtectedMethod"); setRowColorsInitial(true, "Event"); setRowColorsInitial(true, "Style"); setRowColorsInitial(true, "SkinPart"); setRowColorsInitial(true, "SkinState"); setRowColorsInitial(true, "Constant"); if (isEclipse()) { if (window.name != "classFrame") { var localRef = window.location.href.indexOf('?') != -1 ? window.location.href.substring(0, window.location.href.indexOf('?')) : window.location.href; localRef = localRef.substring(localRef.indexOf("langref/") + 8); if (window.location.search != "") localRef += ("#" + window.location.search.substring(1)); window.location.replace(baseRef + "index.html?" + localRef); return; } else { setStyle(".eclipseBody", "display", "block"); // var isIE = (navigator.appVersion.indexOf("MSIE") != -1) ? true : false; // if (isIE == false && window.location.hash != "") if (window.location.hash != "") window.location.hash=window.location.hash.substring(1); } } else if (window == top) { // no frames findObject("titleTable").style.display = ""; } else { // frames findObject("titleTable").style.display = "none"; } showTitle(asdocTitle); } function loadFrames(classFrameURL, classListFrameURL) { var classListFrame = findObject("classListFrame"); if(classListFrame != null && classListFrameContent!='') classListFrame.document.location.href=classListFrameContent; if (isEclipse()) { var contentViewFrame = findObject(ECLIPSE_FRAME_NAME); if (contentViewFrame != null && classFrameURL != '') contentViewFrame.document.location.href=classFrameURL; } else { var classFrame = findObject("classFrame"); if(classFrame != null && classFrameContent!='') classFrame.document.location.href=classFrameContent; } } function showTitle(title) { if (!isEclipse()) top.document.title = title; } function loadClassListFrame(classListFrameURL) { if (parent.frames["classListFrame"] != null) { parent.frames["classListFrame"].location = classListFrameURL; } else if (parent.frames["packageFrame"] != null) { if (parent.frames["packageFrame"].frames["classListFrame"] != null) { parent.frames["packageFrame"].frames["classListFrame"].location = classListFrameURL; } } } function gotoLiveDocs(primaryURL, secondaryURL, locale) { if (locale == "en-us") { locale = ""; } else { locale = "_" + locale.substring(3); } var url = liveDocsBaseUrl + locale + "/" + liveDocsBookName + "/index.html?" + primaryURL; if (secondaryURL != null && secondaryURL != "") url += ("&" + secondaryURL); window.open(url, "mm_livedocs", "menubar=1,toolbar=1,status=1,scrollbars=1,resizable=yes"); } function findTitleTableObject(id) { if (isEclipse()) return parent.titlebar.document.getElementById(id); else if (top.titlebar) return top.titlebar.document.getElementById(id); else return document.getElementById(id); } function titleBar_setSubTitle(title) { if (isEclipse() || top.titlebar) findTitleTableObject("subTitle").childNodes.item(0).data = title; } function titleBar_setSubNav(showConstants,showProperties,showStyles,showSkinPart,showSkinState,showEffects,showEvents,showConstructor,showMethods,showExamples, showPackageConstants,showPackageProperties,showPackageFunctions,showInterfaces,showClasses,showPackageUse) { if (isEclipse() || top.titlebar) { findTitleTableObject("propertiesLink").style.display = showProperties ? "inline" : "none"; findTitleTableObject("propertiesBar").style.display = (showProperties && (showPackageProperties || showConstructor || showMethods || showPackageFunctions || showEvents || showStyles || showSkinPart || showSkinState || showEffects || showConstants || showPackageConstants || showInterfaces || showClasses || showPackageUse || showExamples)) ? "inline" : "none"; findTitleTableObject("packagePropertiesLink").style.display = showPackageProperties ? "inline" : "none"; findTitleTableObject("packagePropertiesBar").style.display = (showPackageProperties && (showConstructor || showMethods || showPackageFunctions || showEvents || showStyles || showSkinPart || showSkinState || showConstants || showEffects || showPackageConstants || showInterfaces || showClasses || showPackageUse || showExamples)) ? "inline" : "none"; findTitleTableObject("constructorLink").style.display = showConstructor ? "inline" : "none"; findTitleTableObject("constructorBar").style.display = (showConstructor && (showMethods || showPackageFunctions || showEvents || showStyles || showSkinPart || showSkinState || showEffects || showConstants || showPackageConstants || showInterfaces || showClasses || showPackageUse || showExamples)) ? "inline" : "none"; findTitleTableObject("methodsLink").style.display = showMethods ? "inline" : "none"; findTitleTableObject("methodsBar").style.display = (showMethods && (showPackageFunctions || showEvents || showStyles || showSkinPart || showSkinState || showEffects || showConstants || showPackageConstants || showInterfaces || showClasses || showPackageUse || showExamples)) ? "inline" : "none"; findTitleTableObject("packageFunctionsLink").style.display = showPackageFunctions ? "inline" : "none"; findTitleTableObject("packageFunctionsBar").style.display = (showPackageFunctions && (showEvents || showStyles || showSkinPart || showSkinState || showEffects || showConstants || showPackageConstants || showInterfaces || showClasses || showPackageUse || showExamples)) ? "inline" : "none"; findTitleTableObject("eventsLink").style.display = showEvents ? "inline" : "none"; findTitleTableObject("eventsBar").style.display = (showEvents && (showStyles || showSkinPart || showSkinState || showEffects || showConstants || showPackageConstants || showInterfaces || showClasses || showPackageUse || showExamples)) ? "inline" : "none"; findTitleTableObject("stylesLink").style.display = showStyles ? "inline" : "none"; findTitleTableObject("stylesBar").style.display = (showStyles && (showSkinPart || showSkinState || showEffects || showConstants || showPackageConstants || showInterfaces || showClasses || showPackageUse || showExamples)) ? "inline" : "none"; findTitleTableObject("SkinPartLink").style.display = showSkinPart ? "inline" : "none"; findTitleTableObject("SkinPartBar").style.display = (showSkinPart && (showSkinState || showEffects || showConstants || showPackageConstants || showInterfaces || showClasses || showPackageUse || showExamples)) ? "inline" : "none"; findTitleTableObject("SkinStateLink").style.display = showSkinState ? "inline" : "none"; findTitleTableObject("SkinStateBar").style.display = (showSkinState && (showEffects || showConstants || showPackageConstants || showInterfaces || showClasses || showPackageUse || showExamples)) ? "inline" : "none"; findTitleTableObject("effectsLink").style.display = showEffects ? "inline" : "none"; findTitleTableObject("effectsBar").style.display = (showEffects && (showConstants || showPackageConstants || showInterfaces || showClasses || showPackageUse || showExamples)) ? "inline" : "none"; findTitleTableObject("constantsLink").style.display = showConstants ? "inline" : "none"; findTitleTableObject("constantsBar").style.display = (showConstants && (showPackageConstants || showInterfaces || showClasses || showPackageUse || showExamples)) ? "inline" : "none"; findTitleTableObject("packageConstantsLink").style.display = showPackageConstants ? "inline" : "none"; findTitleTableObject("packageConstantsBar").style.display = (showPackageConstants && (showInterfaces || showClasses || showPackageUse || showExamples)) ? "inline" : "none"; findTitleTableObject("interfacesLink").style.display = showInterfaces ? "inline" : "none"; findTitleTableObject("interfacesBar").style.display = (showInterfaces && (showClasses || showPackageUse || showExamples)) ? "inline" : "none"; findTitleTableObject("classesLink").style.display = showClasses ? "inline" : "none"; findTitleTableObject("classesBar").style.display = (showClasses && (showPackageUse || showExamples)) ? "inline" : "none"; findTitleTableObject("packageUseLink").style.display = showPackageUse ? "inline" : "none"; findTitleTableObject("packageUseBar").style.display = (showPackageUse && showExamples) ? "inline" : "none"; findTitleTableObject("examplesLink").style.display = showExamples ? "inline" : "none"; } } function titleBar_gotoClassFrameAnchor(anchor) { if (isEclipse()) parent.classFrame.location = parent.classFrame.location.toString().split('#')[0] + "#" + anchor; else top.classFrame.location = top.classFrame.location.toString().split('#')[0] + "#" + anchor; } function setMXMLOnly() { if (getCookie("showMXML") == "false") { toggleMXMLOnly(); } } function toggleMXMLOnly() { var mxmlDiv = findObject("mxmlSyntax"); var mxmlShowLink = findObject("showMxmlLink"); var mxmlHideLink = findObject("hideMxmlLink"); if (mxmlDiv && mxmlShowLink && mxmlHideLink) { if (mxmlDiv.style.display == "none") { mxmlDiv.style.display = "block"; mxmlShowLink.style.display = "none"; mxmlHideLink.style.display = "inline"; setCookie("showMXML","true", new Date(3000,1,1,1,1), "/", document.location.domain); } else { mxmlDiv.style.display = "none"; mxmlShowLink.style.display = "inline"; mxmlHideLink.style.display = "none"; setCookie("showMXML","false", new Date(3000,1,1,1,1), "/", document.location.domain); } } } function showHideInherited() { setInheritedVisible(getCookie("showInheritedConstant") == "true", "Constant"); setInheritedVisible(getCookie("showInheritedProtectedConstant") == "true", "ProtectedConstant"); setInheritedVisible(getCookie("showInheritedProperty") == "true", "Property"); setInheritedVisible(getCookie("showInheritedProtectedProperty") == "true", "ProtectedProperty"); setInheritedVisible(getCookie("showInheritedMethod") == "true", "Method"); setInheritedVisible(getCookie("showInheritedProtectedMethod") == "true", "ProtectedMethod"); setInheritedVisible(getCookie("showInheritedEvent") == "true", "Event"); setInheritedVisible(getCookie("showInheritedStyle") == "true", "Style"); setInheritedVisible(getCookie("showInheritedSkinPart") == "true", "SkinPart"); setInheritedVisible(getCookie("showInheritedSkinState") == "true", "SkinState"); setInheritedVisible(getCookie("showInheritedEffect") == "true", "Effect"); } function setInheritedVisible(show, selectorText) { if (document.styleSheets[0].cssRules != undefined) { var rules = document.styleSheets[0].cssRules; for (var i = 0; i < rules.length; i++) { if (rules[i].selectorText == ".hideInherited" + selectorText) rules[i].style.display = show ? "" : "none"; if (rules[i].selectorText == ".showInherited" + selectorText) rules[i].style.display = show ? "none" : ""; } } else { document.styleSheets[0].addRule(".hideInherited" + selectorText, show ? "display:inline" : "display:none"); document.styleSheets[0].addRule(".showInherited" + selectorText, show ? "display:none" : "display:inline"); } setCookie("showInherited" + selectorText, show ? "true" : "false", new Date(3000,1,1,1,1), "/", document.location.domain); setRowColors(show, selectorText); } function setRowColors(show, selectorText) { var rowColor = "#F2F2F2"; var table = findObject("summaryTable" + selectorText); if (table != null) { var rowNum = 0; for (var i = 1; i < table.rows.length; i++) { if (table.rows[i].className.indexOf("hideInherited") == -1 || show) { rowNum++; table.rows[i].bgColor = (rowNum % 2 == 0) ? rowColor : "#FFFFFF"; } } } } function setRowColorsInitial(show, selectorText) { var rowColor = "#F2F2F2"; var table = findObject("summaryTable" + selectorText); if (table != null) { var rowNum = 0; for (var i = 1; i < table.rows.length; i++) { if (table.rows[i].className.indexOf("hideInherited") == -1 && show) { rowNum++; table.rows[i].bgColor = (rowNum % 2 == 0) ? rowColor : "#FFFFFF"; } } } } function setStyle(selectorText, styleName, newValue) { if (document.styleSheets[0].cssRules != undefined) { var rules = document.styleSheets[0].cssRules; for (var i = 0; i < rules.length; i++) { if (rules[i].selectorText == selectorText) { rules[i].style[styleName] = newValue; break; } } } else { document.styleSheets[0].addRule(selectorText, styleName + ":" + newValue); } }
JavaScript
//////////////////////////////////////////////////////////////////////////////// // // ADOBE SYSTEMS INCORPORATED // Copyright 2006-2008 Adobe Systems Incorporated // All Rights Reserved. // // NOTICE: Adobe permits you to use, modify, and distribute this file // in accordance with the terms of the license agreement accompanying it. // //////////////////////////////////////////////////////////////////////////////// /** * Read the JavaScript cookies tutorial at: * http://www.netspade.com/articles/javascript/cookies.xml */ /** * Sets a Cookie with the given name and value. * * name Name of the cookie * value Value of the cookie * [expires] Expiration date of the cookie (default: end of current session) * [path] Path where the cookie is valid (default: path of calling document) * [domain] Domain where the cookie is valid * (default: domain of calling document) * [secure] Boolean value indicating if the cookie transmission requires a * secure transmission */ function setCookie(name, value, expires, path, domain, secure) { document.cookie= name + "=" + escape(value) + ((expires) ? "; expires=" + expires.toGMTString() : "") + ((path) ? "; path=" + path : "") + ((domain) ? "; domain=" + domain : "") + ((secure) ? "; secure" : ""); } /** * Gets the value of the specified cookie. * * name Name of the desired cookie. * * Returns a string containing value of specified cookie, * or null if cookie does not exist. */ function getCookie(name) { var dc = document.cookie; var prefix = name + "="; var begin = dc.indexOf("; " + prefix); if (begin == -1) { begin = dc.indexOf(prefix); if (begin != 0) return null; } else { begin += 2; } var end = document.cookie.indexOf(";", begin); if (end == -1) { end = dc.length; } return unescape(dc.substring(begin + prefix.length, end)); } /** * Deletes the specified cookie. * * name name of the cookie * [path] path of the cookie (must be same as path used to create cookie) * [domain] domain of the cookie (must be same as domain used to create cookie) */ function deleteCookie(name, path, domain) { if (getCookie(name)) { document.cookie = name + "=" + ((path) ? "; path=" + path : "") + ((domain) ? "; domain=" + domain : "") + "; expires=Thu, 01-Jan-70 00:00:01 GMT"; } }
JavaScript
//////////////////////////////////////////////////////////////////////////////// // // ADOBE SYSTEMS INCORPORATED // Copyright 2008 Adobe Systems Incorporated // All Rights Reserved. // // NOTICE: Adobe permits you to use, modify, and distribute this file // in accordance with the terms of the license agreement accompanying it. // //////////////////////////////////////////////////////////////////////////////// function closePopup() { window.close(); } function scrollToNameAnchor() { var nameAnchor = window.location.href; var value = nameAnchor.split("nameAnchor="); if (value[1] != null) { document.location =value[0]+"#"+ value[1]; } } // HIDES AND SHOWS LARGE GRAPHICS IN THE CONTENT PAGES function showHideImage(thisID, obj) { var imgElement = document.getElementById(thisID); var imgText = obj; if( imgElement.className == "largeImage" ) { imgElement.src = "images/" + thisID + ".png"; imgElement.className="smallImage"; obj.className="showImageLink"; obj.href="#"; obj.firstChild.nodeValue = terms_AHV_LARGE_GRAPHIC; window.focus(); } else { imgElement.src = "images/" + thisID + "_popup.png"; imgElement.className="largeImage"; obj.className="hideImageLink"; obj.href="#"; obj.firstChild.nodeValue = terms_AHV_SMALL_GRAPHIC; window.focus(); } } // js function for expand collapse menu functionality function KeyCheck(e, tree, idx) { var KeyID = (window.event) ? event.keyCode : e.keyCode; var node = YAHOO.widget.TreeView.getNode(tree, idx); switch(KeyID) { case 37: // alert("Arrow Left"); node.collapse(); break; case 39: // alert("Arrow Right"); node.expand(); break; } } // js function for hide/display mini-elements functionality function toggleLayer(whichLayer) { if (document.getElementById) { // this is the way the standards work var obj=document.getElementById(whichLayer); var img = obj.previousSibling.firstChild.firstChild; img.setAttribute("src","images/on.gif"); var styleatt = obj.style; styleatt.display = styleatt.display? "":"block"; //change the class of the h3 per design if (obj.previousSibling.className === "topictitle3") { obj.previousSibling.className ="topictitle3off"; img.setAttribute("src","images/on.gif"); } else if (obj.previousSibling.className === "topictitle3off") { obj.previousSibling.className ="topictitle3"; img.setAttribute("src","images/off.gif"); } } else if (document.all) { // this is the way old msie versions work var style2 = document.all[whichLayer].style; style2.display = style2.display? "":"block"; } } function addBookmark( bm_url_str, bm_str_label ) { parent.navigation.flashProxy.call('addBookmark', bm_url_str, bm_str_label ); } var upperAsciiXlatTbl = new Array( 223,"ss", 230,"ae", 198,"ae", 156,"oe", 140,"oe", 240,"eth", 208,"eth", 141,"y", 159,"y" ); var maxNumberOfShownSearchHits = 30; var showInputStringAlerts = 0; var navigationCookie = ""; ////////////// COOKIE-RELATED FUNCTIONS ///////////////////////////////////////// // test the navigator object for cookie enabling // additional code would need to be added for // to support browsers pre navigator 4 or IE5 or // other browsers that dont support // the navigator object if any .. function cookiesNotEnabled() { return true; // We're not going to use cookies } /* * This function parses comma-separated name=value * argument pairs from the query string of the URL. * It stores the name=value pairs in * properties of an object and returns that object. */ function getArgs() { var args = new Object(); var query = window.location.search.substring(1); // Get query string if (query.length > 0) { var pairs = query.split(","); // Break at comma for(var i = 0; i < pairs.length; i++) { var pos = pairs[i].indexOf('='); // Look for "name=value" if (pos == -1) continue; // If not found, skip var argname = pairs[i].substring(0,pos); // Extract the name var value = pairs[i].substring(pos+1); // Extract the value args[argname] = unescape(value); // Store as a property // In JavaScript 1.5, use decodeURIComponent( ) // instead of escape( ) } } else { args[name] = false; } return args; // Return the object } /////////////////////////////// COOKIE-RELATED FUNCTIONS //////////////////////// // Bill Dortch getCookieVal and GetCookie routines function getCookieVal(offset) { var endstr=document.cookie.indexOf(";",offset); if (endstr==-1)endstr=document.cookie.length; return unescape(document.cookie.substring(offset, endstr)); } function GetCookie(name) { var arg=name+"="; var alen=arg.length; var clen=document.cookie.length; var i=0; if (cookiesNotEnabled()) { var args = getArgs(); if (args[name] !== false) { return args[name]; } } else { while(i<clen){ var j=i+alen; if(document.cookie.substring(i,j)==arg)return getCookieVal(j); i=document.cookie.indexOf(" ",i)+1; if(i==0)break; } return null; } } function getTopCookieVal(offset) { var endstr=document.cookie.indexOf(";",offset); if (endstr==-1)endstr=document.cookie.length; return unescape(document.cookie.substring(offset, endstr)); } function GetTopCookie(name) { var arg=name+"="; var alen=arg.length; var clen=document.cookie.length; var i=0; while(i<clen){ var j=i+alen; if(document.cookie.substring(i,j)==arg)return getTopCookieVal(j); i=document.cookie.indexOf(" ",i)+1; if(i==0)break; } return null; } // SetCookie // ----------- // This function is called to set a cookie in the current document. // params: // n - name of the cookie // v - value of the cookie // minutes - the duration of the cookie in minutes (that is, how many minutes before it expires) function SetCookie(n,v,minutes) { var Then = new Date(); Then.setTime(Then.getTime() + minutes * 60 * 1000); document.cookie = n + "=" + v + ";expires=" + Then.toGMTString(); } // getContentCookie // ---------------- // This function reads the content cookie set by the handleContext funtion. // function getContentCookie() { var contentCookie = GetCookie("content"); document.cookie = "content="; // What does this expression mean? // (contentCookie.indexOf("htm") != -1) if ( (contentCookie != null) && (contentCookie.indexOf("htm") != -1) ) { document.cookie = "content="; // Wipe out the cookie document.cookie = "histR=" + contentCookie; location.replace(contentCookie); } } // getNavigationCookie // ------------------- // This function reads the content cookie set by the handleContext funtion. // function getNavigationCookie() { navigationCookie = GetCookie("navigation"); document.cookie = "navigation="; // What does this expression mean? // (navigationCookie.indexOf("htm") != -1) if ( (navigationCookie != null) && (navigationCookie.indexOf("htm") != -1) ) { document.cookie = "navigation="; // Wipe out the cookie document.cookie = "histL=" + navigationCookie; location.replace(navigationCookie); } } // handleContext // ------------- // This function is called from content pages. It sets a cookie as soon // as the page is loaded. If the content page is not in it's proper place // in the frameset, the frameset will be loaded and the page will be // restored using the value in this cookie. // function handleContext(which) { } // lastNodeOf // ---------- // This function gets passed a URL and returns the last node of same. function lastNodeOf(e) { var expr = "" + e; var to = expr.indexOf("?"); if( to !== -1) { var path = expr.substring(0,to); var pieces = path.split("/"); return pieces[pieces.length -1]; } else { var pos = expr.lastIndexOf("/"); if( (pos != -1) && (pos+1 != expr.length) ) { return expr.substr(pos+1); } else { return expr; } } } // frameBuster // ----------- // This function is called by the frameset to ensure it's always loaded // at the top level of the current window. // function frameBuster() { } // SEARCH RELATED.......................................SEARCH RELATED // SEARCH RELATED.......................................SEARCH RELATED // SEARCH RELATED.......................................SEARCH RELATED // SEARCH RELATED.......................................SEARCH RELATED // SEARCH RELATED.......................................SEARCH RELATED // SEARCH RELATED.......................................SEARCH RELATED // SEARCH RELATED.......................................SEARCH RELATED // SEARCH RELATED.......................................SEARCH RELATED // SEARCH RELATED.......................................SEARCH RELATED // SEARCH RELATED.......................................SEARCH RELATED function bubbleSortWithShadow(a,b) { var temp; for(var j=1; j<a.length; j++) { for(var i=0; i<j; i++) { if( a[i] < a[j] ) { temp = a[j];a[j] = a[i];a[i] = temp; temp = b[j];b[j] = b[i];b[i] = temp; } } } } //--------------------------------------------------- function buildHtmlResultsStr() { var innerHTMLstring,ndxEnd; // Gather all of the results display lines into the 'resultsArr' ndxEnd = (matchesArrIndices.length > maxNumberOfShownSearchHits ) ? maxNumberOfShownSearchHits : matchesArrIndices.length; for(var ndx=0, resultsArr = new Array(); ndx < ndxEnd; ndx++) { resultsArr[resultsArr.length] = buildResultsStrOneLine(matchesArrIndices[ndx],matchesArrHits[ndx]); } // Convert this 'resultsArr' into a single string that will be injected into this search page. innerHTMLstring = "<ol>"; for( var ndx=0; ndx < resultsArr.length; ndx++ ) { innerHTMLstring = innerHTMLstring + resultsArr[ndx]; } innerHTMLstring = innerHTMLstring + "</ol>"; return innerHTMLstring; } //--------------------------------------------------- function buildResultsStrOneLine(a,b) { var retStr; retStr = "<li class=\"searchresults\"><a href=\"" + fileArr[a] + ".html\">"; // for debug... //retStr += "target=\"content\" "; //retStr += "title=\"" + top.fileArr[a] + ".html-"; //retStr += a + "-" + b + "\">"; // for production... //retStr += "target=\"AdobeHelp\" >"; retStr += titleArr[a] + "</a></li>"; return retStr; } //--------------------------------------------------- // checkForHits // Break up the search term into words. // Check each of those words against... // (a) cached titles and // (b) cached content lines // Perform the hit detection for each one, // storing the results into (hits-ordered) // 'matchesArrIndices' and // 'matchesArrHits'. //--------------------------------------------------- function checkForHits() { var inputWords = new Array(); var tempArr = new Array(); // Split the search term into individual search words tempArr = searchTerm.split(" "); for(var ndx=0; ndx < tempArr.length; ndx++) { if( tempArr[ndx].length ) { inputWords[inputWords.length] = tempArr[ndx]; } } // Initialization matchesArrHits = new Array(); matchesArrIndices = new Array(); // Initialize the 'maskArr' and the 'hitsArr' maskArr = new Array(); hitsArr = new Array(); for( var ndx = 0; ndx < fileArr.length; ndx++ ) { maskArr[maskArr.length] = 1; hitsArr[hitsArr.length] = 0; } // Do checking for matches on EACH OF THE INPUT WORDS for( var ndx = 0; ndx < inputWords.length; ndx++ ) { // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! if( ! checkForHitsWordAgainstPages( inputWords[ndx] ) ) { return; // No sense in continuing, match has failed. } // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! for( var ndx2 = 0; ndx2 < hitsArr.length; ndx2++ ) { if( hitsArr[ndx2] == 0 ) { maskArr[ndx2] = 0; } else { if( maskArr[ndx2] != 0 ) { maskArr[ndx2] += hitsArr[ndx2]; } } } } // From the final 'maskArr', generate 'matchesArrHits' and 'matchesArrIndices' for( var ndx = 0; ndx < maskArr.length; ndx++ ) { if( maskArr[ndx] ) { matchesArrHits[matchesArrHits.length] = maskArr[ndx]; matchesArrIndices[matchesArrIndices.length] = ndx; } } // If there were any hits, then sort them by highest hits first if( matchesArrIndices.length ) { bubbleSortWithShadow(matchesArrHits, matchesArrIndices); } } //--------------------------------------------------- function checkForHitsWordAgainstPages(w) { var hitAnywhere = 0; if(showInputStringAlerts){alert( "Length of sc2: " + sc2.length );} // Process each of the content lines (one per file/page) for(var ndx=0; ndx < sc2.length; ndx++) { // Put the cached title into glob_title glob_title = sc1[ndx]; // Put the cached content line into glob_phrase glob_phrase = sc2[ndx]; if( maskArr[ndx] ) { // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! if( document.isDblByte ) { hitsArr[ndx] = checkForHitsWordAgainstTitleAndLine2(w,ndx); } else { hitsArr[ndx] = checkForHitsWordAgainstTitleAndLine(w,ndx); } if( hitsArr[ndx] ) { hitAnywhere = 1; } // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! } } return hitAnywhere; } //--------------------------------------------------- function checkForHitsWordAgainstTitleAndLine(w, lineNdx) { var words; var titleHitCnt = 0; var contentHitCnt = 0; var regex = new RegExp(w, "i"); // TITLE ......................................... words = new Array(); if(glob_title!=null){ words = glob_title.split(" "); } // EXECUTE TITLE MATCH TEST for( var ndx = 0; ndx < words.length; ndx++ ) { if( w == words[ndx] ) { titleHitCnt += 100; break; } } // CONTENT ......................................... words = new Array(); if(glob_phrase!=null){ words = glob_phrase.split(" "); } // EXECUTE CONTENT MATCH TEST if( regex.test(glob_phrase) ) { // See if word is anywhere within the phrase first. for( var ndx = 0; ndx < words.length; ndx++ ) { if( w == words[ndx] ) { contentHitCnt += getInstanceCount(lineNdx,ndx); break; } //else if( w < words[ndx] ) { // If word is greater than the remaining words, leave // break; //} } } return titleHitCnt + contentHitCnt; } //--------------------------------------------------- function checkForHitsWordAgainstTitleAndLine2(w, lineNdx) { var titleHitCnt = 0; var contentHitCnt = 0; // TITLE ......................................... if( glob_title.indexOf(w) != -1 ) { titleHitCnt = 100; } // CONTENT ......................................... contentHitCnt = indexesOf(glob_phrase,w); return titleHitCnt + contentHitCnt; } //--------------------------------------------------- // checkTheInputString // // returns... // empty string - if there is valid input to search // message string - if there is NO VALID INPUT to search //--------------------------------------------------- function checkTheInputString() { var myArr = new Array(); var tempArr = new Array(); var foundStopOrShortWord = 0; var ptn1 = /\d\D/; var ptn2 = /\D\d/; handleWhitespaceRemoval(); searchTerm = searchTerm.replace (/(%20)+/g," ") ; searchTerm = searchTerm.toLowerCase(); searchTerm = filterTheChars(searchTerm); handleWhitespaceRemoval(); if( searchTerm.length ) { // Split the searchTerm tempArr = searchTerm.split(" ",100); if(showInputStringAlerts){alert( "size of tempArr: " + tempArr.length );} // Handle periods for( var ndx = 0; ndx < tempArr.length; ndx++ ) { if( tempArr[ndx].charCodeAt(0) == 46 ) { // periods at the start of word //tempArr[ndx] = tempArr[ndx].substr(1); // NOTE: We don't want to do this. (e.g. ".txt") } if( tempArr[ndx].charCodeAt(tempArr[ndx].length-1) == 46 ) { // end of word tempArr[ndx] = tempArr[ndx].substr(0,tempArr[ndx].length-1); } } // Do stopwords and shortwords removal for( var ndx = 0; ndx < tempArr.length; ndx++ ) { var word = tempArr[ndx]; if(showInputStringAlerts){alert( "Checking word: " + word );} if( ! sw[word] ) { if( word.length < 2 ) { foundStopOrShortWord = 1; } else if( (word.length > 2) || (ptn1.test(word) || ptn2.test(word)) ) { myArr[myArr.length] = tempArr[ndx]; } else { foundStopOrShortWord = 1; } } else { foundStopOrShortWord = 1; } } // Now reconstruct the searchTerm, based upon the 'myArr' searchTerm = ""; for( var ndx = 0; ndx < myArr.length; ndx++ ) { searchTerm = searchTerm + myArr[ndx] + " "; } handleWhitespaceRemoval(); if(showInputStringAlerts){alert( "FINAL SEARCH TERM: *" + searchTerm + "*" );} if( foundStopOrShortWord && ! searchTerm.length ) { return MSG_stopAndShortWords; } srch_input_massaged = searchTerm; return ""; } else { return MSG_noSearchTermEntered; } } //--------------------------------------------------- function checkTheInputString2() // double-byte version { var tempArr = new Array(); handleWhitespaceRemoval(); searchTerm = searchTerm.toLowerCase(); if( searchTerm.length ) { // Split the searchTerm tempArr = searchTerm.split(" ",100); if(showInputStringAlerts){alert( "number of search terms: " + tempArr.length );} // Now reconstruct the searchTerm, based upon the 'tempArr' searchTerm = ""; for( var ndx = 0; ndx < tempArr.length; ndx++ ) { searchTerm = searchTerm + tempArr[ndx] + " "; } handleWhitespaceRemoval(); if(showInputStringAlerts){alert( "Massaged search term: " + searchTerm );} srch_input_massaged = searchTerm; return ""; } else { return MSG_noSearchTermEntered; } } //--------------------------------------------------- function doIEsearch() { var stStr = ""; document.forms[0].sh_term.value = srch_input_verbatim; if( srch_message.length ) { document.getElementById("results").innerHTML = srch_message; srch_message = ""; } else if( srch_1_shot ) { srch_1_shot = 0; searchTerm = srch_input_massaged; checkForHits(); // Sets: 'matchesArrIndices' and 'matchesArrHits' if( matchesArrIndices.length ) { // If there were matches/hits... /* Changed for CS4 */ stStr = "<div class=\"form\">" + MSG_pagesContaining + "<strong>" + srch_input_massaged + "</strong></div><br /><br />\n"; document.getElementById("results").innerHTML = stStr + buildHtmlResultsStr(); } else { /* Changed for CS4 */ document.getElementById("results").innerHTML = MSG_noPagesContain + "<strong>" + srch_input_massaged + "</strong><br /><br />"; } //searching_message.style.visibility="visible"; } srch_input_verbatim = ""; } //--------------------------------------------------- function getInstanceCount( lineIndex, wordIndex ) { var instancesStr = instances[lineIndex]; // e.g. "1432931" var ch = instancesStr.substr(wordIndex,1); return parseInt(ch); } //--------------------------------------------------- function handleWhitespaceRemoval() { var re_1 = /^\s/; var re_2 = /\s$/; var re_3 = /\s\s/; var temp; // Remove leading whitespace while( true ) { temp = searchTerm.replace(re_1,""); if( temp == searchTerm ) { break; } searchTerm = temp; } // Remove trailing whitespace while( true ) { temp = searchTerm.replace(re_2,""); if( temp == searchTerm ) { break; } searchTerm = temp; } // Replace multiple contiguous spaces with a single space while( searchTerm.search(re_3) != -1 ) { temp = searchTerm.replace(re_3," "); searchTerm = temp; } } //-------------------------------------------------- function isAcceptableChar(chrNdx) { var acceptableChars = new Array( 32, 46, 95 ); // space, period, underscore for( var ndx = 0; ndx < acceptableChars.length; ndx++ ) { if( chrNdx == acceptableChars[ndx] ) { return true; } } return false; } //-------------------------------------------------- function indexesOf(str,ptn) { var position = 0; var hits = -1; var start = -1; while( position != -1 ) { position = str.indexOf(ptn, start+1); hits += 1; start = position; } return hits; } //-------------------------------------------------- function filterTheChars(line) { var retStr = "",tempStr; var ch, chCode, retChr; var ndx; for( ndx = 0; ndx < line.length; ndx++ ) { ch = line.substr(ndx,1); chCode = ch.charCodeAt(0); if( (chCode >= 192) && (chCode <= 221) ) { // Handle capital upper-ASCII characters chCode = chCode + 32; retChr = ASCII_to_char(chCode); } else if( withinAcceptableRanges(chCode) || isAcceptableChar(chCode) ) { // Acceptable characters retChr = ch; } else { tempStr = isLigatureChar(chCode); if( tempStr.length ) { //Don't replace ligatures. retChr = ch; } else { // Turn all else into space retChr = " "; } } // Grow the return string retStr += retChr; } return retStr; } //-------------------------------------------------- function isLigatureChar(codeToCheck) { var xlatTblNdx, code, replStr = ""; for( xlatTblNdx = 0; xlatTblNdx < upperAsciiXlatTbl.length; xlatTblNdx+=2 ) { code = upperAsciiXlatTbl[xlatTblNdx]; if( code == codeToCheck ) { replStr = upperAsciiXlatTbl[xlatTblNdx+1]; break; } } return replStr; } //-------------------------------------------------- function respondToSearchButton() { var myStr; document.getElementById("results").innerHTML = ""; //We don't expect this to be slow enough to need a message. srch_input_verbatim = document.forms[0].sh_term.value; searchTerm = document.forms[0].sh_term.value; if( document.isDblByte ) { myStr = checkTheInputString2(); } else { myStr = checkTheInputString(); } srch_message = myStr; srch_1_shot = srch_message.length ? 0 : 1; doIEsearch(); } //-------------------------------------------------- function respondToSearchLoad() { var externalQuery = GetCookie("externalQuery"); if (externalQuery == null) { externalQuery = GetCookie("sh_term"); } if (externalQuery != null) { var myStr; srch_input_verbatim = externalQuery; searchTerm = externalQuery; if(document.isDblByte ) { myStr = checkTheInputString2(); } else { myStr = checkTheInputString(); } srch_message = myStr; srch_1_shot = srch_message.length ? 0 : 1; doIEsearch(); } } //--------------------------------------------------- function strReplace(orig,src,dest) { var startPos=0; var matchPos = orig.indexOf(src,startPos); var retLine=""; while(matchPos != -1) { retLine = retLine + orig.substring(startPos,matchPos) + dest; startPos = matchPos+1; matchPos = orig.indexOf(src,startPos); } if(! retLine.length) {return orig;} else {return retLine+orig.substring(startPos,orig.length);} } //-------------------------------------------------- function withinAcceptableRanges(chrNdx) { var acceptableRanges = new Array( "48-57","65-90","97-122","224-229","231-239","241-246","248-253","255-255"); for( var ndx = 0; ndx < acceptableRanges.length; ndx++ ) { var start_finish = new Array(); start_finish = acceptableRanges[ndx].split("-"); if( (chrNdx >= start_finish[0]) && (chrNdx <= start_finish[1]) ) { return true; } } return false; } //-------------------------------------------------- function ASCII_to_char(num_in) { var str_out = ""; var num_out = parseInt(num_in); num_out = unescape('%' + num_out.toString(16)); str_out += num_out; return unescape(str_out); } //-------------------------------------------------- var agt=navigator.userAgent.toLowerCase(); var use_ie_behavior = false; var use_ie_6_behavior = false; if (agt.indexOf("msie") != -1) { use_ie_behavior = true; } if ((agt.indexOf("msie 5") != -1) || (agt.indexOf("msie 6") != -1)) { use_ie_6_behavior = true; } //-------------------------------------------------- var Url = { // public method for url encoding encode : function (string) { return escape(this._utf8_encode(string)); }, // public method for url decoding decode : function (string) { return this._utf8_decode(unescape(string)); }, // private method for UTF-8 encoding _utf8_encode : function (string) { string = string.replace(/\r\n/g,"\n"); var utftext = ""; for (var n = 0; n < string.length; n++) { var c = string.charCodeAt(n); if (c < 128) { utftext += String.fromCharCode(c); } else if((c > 127) && (c < 2048)) { utftext += String.fromCharCode((c >> 6) | 192); utftext += String.fromCharCode((c & 63) | 128); } else { utftext += String.fromCharCode((c >> 12) | 224); utftext += String.fromCharCode(((c >> 6) & 63) | 128); utftext += String.fromCharCode((c & 63) | 128); } } return utftext; }, // private method for UTF-8 decoding _utf8_decode : function (utftext) { var string = ""; var i = 0; var c = c1 = c2 = 0; while ( i < utftext.length ) { c = utftext.charCodeAt(i); if (c < 128) { string += String.fromCharCode(c); i++; } else if((c > 191) && (c < 224)) { c2 = utftext.charCodeAt(i+1); string += String.fromCharCode(((c & 31) << 6) | (c2 & 63)); i += 2; } else { c2 = utftext.charCodeAt(i+1); c3 = utftext.charCodeAt(i+2); string += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63)); i += 3; } } return string; } }
JavaScript
//////////////////////////////////////////////////////////////////////////////// // // ADOBE SYSTEMS INCORPORATED // Copyright 2008 Adobe Systems Incorporated // All Rights Reserved. // // NOTICE: Adobe permits you to use, modify, and distribute this file // in accordance with the terms of the license agreement accompanying it. // //////////////////////////////////////////////////////////////////////////////// //v1.0 function AC_AddExtension(src, ext) { if (src.indexOf('?') != -1) return src.replace(/\?/, ext+'?'); else return src + ext; } function AC_Generateobj(objAttrs, params, embedAttrs) { var str = '<object '; for (var i in objAttrs) str += i + '="' + objAttrs[i] + '" '; str += '>'; for (var i in params) str += '<param name="' + i + '" value="' + params[i] + '" /> '; str += '<embed '; for (var i in embedAttrs) str += i + '="' + embedAttrs[i] + '" '; str += ' ></embed></object>'; document.write(str); } function AC_FL_RunContent(){ var ret = AC_GetArgs ( arguments, ".swf", "movie", "clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" , "application/x-shockwave-flash" ); AC_Generateobj(ret.objAttrs, ret.params, ret.embedAttrs); } function AC_GetArgs(args, ext, srcParamName, classid, mimeType){ var ret = new Object(); ret.embedAttrs = new Object(); ret.params = new Object(); ret.objAttrs = new Object(); for (var i=0; i < args.length; i=i+2){ var currArg = args[i].toLowerCase(); switch (currArg){ case "classid": break; case "pluginspage": ret.embedAttrs[args[i]] = args[i+1]; break; case "src": case "movie": args[i+1] = AC_AddExtension(args[i+1], ext); ret.embedAttrs["src"] = args[i+1]; ret.params[srcParamName] = args[i+1]; break; case "onafterupdate": case "onbeforeupdate": case "onblur": case "oncellchange": case "onclick": case "ondblClick": case "ondrag": case "ondragend": case "ondragenter": case "ondragleave": case "ondragover": case "ondrop": case "onfinish": case "onfocus": case "onhelp": case "onmousedown": case "onmouseup": case "onmouseover": case "onmousemove": case "onmouseout": case "onkeypress": case "onkeydown": case "onkeyup": case "onload": case "onlosecapture": case "onpropertychange": case "onreadystatechange": case "onrowsdelete": case "onrowenter": case "onrowexit": case "onrowsinserted": case "onstart": case "onscroll": case "onbeforeeditfocus": case "onactivate": case "onbeforedeactivate": case "ondeactivate": case "type": case "codebase": ret.objAttrs[args[i]] = args[i+1]; break; case "width": case "height": case "align": case "vspace": case "hspace": case "class": case "title": case "accesskey": case "name": case "id": case "tabindex": ret.embedAttrs[args[i]] = ret.objAttrs[args[i]] = args[i+1]; break; default: ret.embedAttrs[args[i]] = ret.params[args[i]] = args[i+1]; } } ret.objAttrs["classid"] = classid; if (mimeType) ret.embedAttrs["type"] = mimeType; return ret; }
JavaScript
// // Global state // // map - the map object // usermark- marks the user's position on the map // markers - list of markers on the current map (not including the user position) // // // // First time run: request current location, with callback to Start // if (navigator.geolocation) { navigator.geolocation.getCurrentPosition(Start); } function UpdateMapById(id, tag) { var target = document.getElementById(id); var data = target.innerHTML; var rows = data.split("\n"); for (i in rows) { var cols = rows[i].split("\t"); var lat = cols[0]; var long = cols[1]; markers.push(new google.maps.Marker({ map:map, position: new google.maps.LatLng(lat,long), title: tag+"\n"+cols.join("\n")})); } } function ClearMarkers() { // clear the markers while (markers.length>0) { markers.pop().setMap(null); } } function UpdateMap() { var color = document.getElementById("color"); color.innerHTML="<b><blink>Updating Display...</blink></b>"; color.style.backgroundColor='white'; ClearMarkers(); UpdateMapById("committee_data","COMMITTEE"); UpdateMapById("candidate_data","CANDIDATE"); UpdateMapById("individual_data", "INDIVIDUAL"); UpdateMapById("opinion_data","OPINION"); color.innerHTML="Ready"; if (Math.random()>0.5) { color.style.backgroundColor='blue'; } else { color.style.backgroundColor='red'; } } function NewData(data) { var target = document.getElementById("data"); target.innerHTML = data; UpdateMap(); } function ViewShift() { var bounds = map.getBounds(); var ne = bounds.getNorthEast(); var sw = bounds.getSouthWest(); var color = document.getElementById("color"); color.innerHTML="<b><blink>Querying...("+ne.lat()+","+ne.lng()+") to ("+sw.lat()+","+sw.lng()+")</blink></b>"; color.style.backgroundColor='white'; // debug status flows through by cookie $.get("rwb.pl?act=near&latne="+ne.lat()+"&longne="+ne.lng()+"&latsw="+sw.lat()+"&longsw="+sw.lng()+"&format=raw&what=committees,candidates", NewData); } function Reposition(pos) { var lat=pos.coords.latitude; var long=pos.coords.longitude; map.setCenter(new google.maps.LatLng(lat,long)); usermark.setPosition(new google.maps.LatLng(lat,long)); } function Start(location) { var lat = location.coords.latitude; var long = location.coords.longitude; var acc = location.coords.accuracy; var mapc = $( "#map"); map = new google.maps.Map(mapc[0], { zoom:16, center:new google.maps.LatLng(lat,long), mapTypeId: google.maps.MapTypeId.HYBRID } ); usermark = new google.maps.Marker({ map:map, position: new google.maps.LatLng(lat,long), title: "You are here"}); markers = new Array; var color = document.getElementById("color"); color.style.backgroundColor='white'; color.innerHTML="<b><blink>Waiting for first position</blink></b>"; var options=document.getElementById("options"); options.innerHTML="<label><input type='checkbox' name='color_choices' value='red' checked='checked' onChange='UpdateMap()'/>A Red One</label>"; google.maps.event.addListener(map,"bounds_changed",ViewShift); google.maps.event.addListener(map,"center_changed",ViewShift); google.maps.event.addListener(map,"zoom_changed",ViewShift); navigator.geolocation.watchPosition(Reposition); }
JavaScript
/* * FancyBox - simple and fancy jQuery plugin * Examples and documentation at: http://fancy.klade.lv/ * Version: 1.2.1 (13/03/2009) * Copyright (c) 2009 Janis Skarnelis * Licensed under the MIT License: http://en.wikipedia.org/wiki/MIT_License * Requires: jQuery v1.3+ */ ;(function($) { $.fn.fixPNG = function() { return this.each(function () { var image = $(this).css('backgroundImage'); if (image.match(/^url\(["']?(.*\.png)["']?\)$/i)) { image = RegExp.$1; $(this).css({ 'backgroundImage': 'none', 'filter': "progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, sizingMethod=" + ($(this).css('backgroundRepeat') == 'no-repeat' ? 'crop' : 'scale') + ", src='" + image + "')" }).each(function () { var position = $(this).css('position'); if (position != 'absolute' && position != 'relative') $(this).css('position', 'relative'); }); } }); }; var elem, opts, busy = false, imagePreloader = new Image, loadingTimer, loadingFrame = 1, imageRegExp = /\.(jpg|gif|png|bmp|jpeg)(.*)?$/i; var isIE = ($.browser.msie && parseInt($.browser.version.substr(0,1)) < 8); $.fn.fancybox = function(settings) { settings = $.extend({}, $.fn.fancybox.defaults, settings); var matchedGroup = this; function _initialize() { elem = this; opts = settings; _start(); return false; }; function _start() { if (busy) return; if ($.isFunction(opts.callbackOnStart)) { opts.callbackOnStart(); } opts.itemArray = []; opts.itemCurrent = 0; if (settings.itemArray.length > 0) { opts.itemArray = settings.itemArray; } else { var item = {}; if (!elem.rel || elem.rel == '') { var item = {href: elem.href, title: elem.title}; if ($(elem).children("img:first").length) { item.orig = $(elem).children("img:first"); } opts.itemArray.push( item ); } else { var subGroup = $(matchedGroup).filter("a[rel=" + elem.rel + "]"); var item = {}; for (var i = 0; i < subGroup.length; i++) { item = {href: subGroup[i].href, title: subGroup[i].title}; if ($(subGroup[i]).children("img:first").length) { item.orig = $(subGroup[i]).children("img:first"); } opts.itemArray.push( item ); } while ( opts.itemArray[ opts.itemCurrent ].href != elem.href ) { opts.itemCurrent++; } } } if (opts.overlayShow) { if (isIE) { $('embed, object, select').css('visibility', 'hidden'); } $("#fancy_overlay").css('opacity', opts.overlayOpacity).show(); } _change_item(); }; function _change_item() { $("#fancy_right, #fancy_left, #fancy_close, #fancy_title").hide(); var href = opts.itemArray[ opts.itemCurrent ].href; if (href.match(/#/)) { var target = window.location.href.split('#')[0]; target = href.replace(target, ''); target = target.substr(target.indexOf('#')); _set_content('<div id="fancy_div">' + $(target).html() + '</div>', opts.frameWidth, opts.frameHeight); } else if (href.match(imageRegExp)) { imagePreloader = new Image; imagePreloader.src = href; if (imagePreloader.complete) { _proceed_image(); } else { $.fn.fancybox.showLoading(); $(imagePreloader).unbind().bind('load', function() { $(".fancy_loading").hide(); _proceed_image(); }); } } else if (href.match("iframe") || elem.className.indexOf("iframe") >= 0) { _set_content('<iframe id="fancy_frame" onload="$.fn.fancybox.showIframe()" name="fancy_iframe' + Math.round(Math.random()*1000) + '" frameborder="0" hspace="0" src="' + href + '"></iframe>', opts.frameWidth, opts.frameHeight); } else { $.get(href, function(data) { _set_content( '<div id="fancy_ajax">' + data + '</div>', opts.frameWidth, opts.frameHeight ); }); } }; function _proceed_image() { if (opts.imageScale) { var w = $.fn.fancybox.getViewport(); var r = Math.min(Math.min(w[0] - 36, imagePreloader.width) / imagePreloader.width, Math.min(w[1] - 60, imagePreloader.height) / imagePreloader.height); var width = Math.round(r * imagePreloader.width); var height = Math.round(r * imagePreloader.height); } else { var width = imagePreloader.width; var height = imagePreloader.height; } _set_content('<img alt="" id="fancy_img" src="' + imagePreloader.src + '" />', width, height); }; function _preload_neighbor_images() { if ((opts.itemArray.length -1) > opts.itemCurrent) { var href = opts.itemArray[opts.itemCurrent + 1].href; if (href.match(imageRegExp)) { objNext = new Image(); objNext.src = href; } } if (opts.itemCurrent > 0) { var href = opts.itemArray[opts.itemCurrent -1].href; if (href.match(imageRegExp)) { objNext = new Image(); objNext.src = href; } } }; function _set_content(value, width, height) { busy = true; var pad = opts.padding; if (isIE) { $("#fancy_content")[0].style.removeExpression("height"); $("#fancy_content")[0].style.removeExpression("width"); } if (pad > 0) { width += pad * 2; height += pad * 2; $("#fancy_content").css({ 'top' : pad + 'px', 'right' : pad + 'px', 'bottom' : pad + 'px', 'left' : pad + 'px', 'width' : 'auto', 'height' : 'auto' }); if (isIE) { $("#fancy_content")[0].style.setExpression('height', '(this.parentNode.clientHeight - 20)'); $("#fancy_content")[0].style.setExpression('width', '(this.parentNode.clientWidth - 20)'); } } else { $("#fancy_content").css({ 'top' : 0, 'right' : 0, 'bottom' : 0, 'left' : 0, 'width' : '100%', 'height' : '100%' }); } if ($("#fancy_outer").is(":visible") && width == $("#fancy_outer").width() && height == $("#fancy_outer").height()) { $("#fancy_content").fadeOut("fast", function() { $("#fancy_content").empty().append($(value)).fadeIn("normal", function() { _finish(); }); }); return; } var w = $.fn.fancybox.getViewport(); var itemLeft = (width + 36) > w[0] ? w[2] : (w[2] + Math.round((w[0] - width - 36) / 2)); var itemTop = (height + 50) > w[1] ? w[3] : (w[3] + Math.round((w[1] - height - 50) / 2)); var itemOpts = { 'left': itemLeft, 'top': itemTop, 'width': width + 'px', 'height': height + 'px' }; if ($("#fancy_outer").is(":visible")) { $("#fancy_content").fadeOut("normal", function() { $("#fancy_content").empty(); $("#fancy_outer").animate(itemOpts, opts.zoomSpeedChange, opts.easingChange, function() { $("#fancy_content").append($(value)).fadeIn("normal", function() { _finish(); }); }); }); } else { if (opts.zoomSpeedIn > 0 && opts.itemArray[opts.itemCurrent].orig !== undefined) { $("#fancy_content").empty().append($(value)); var orig_item = opts.itemArray[opts.itemCurrent].orig; var orig_pos = $.fn.fancybox.getPosition(orig_item); $("#fancy_outer").css({ 'left': (orig_pos.left - 18) + 'px', 'top': (orig_pos.top - 18) + 'px', 'width': $(orig_item).width(), 'height': $(orig_item).height() }); if (opts.zoomOpacity) { itemOpts.opacity = 'show'; } $("#fancy_outer").animate(itemOpts, opts.zoomSpeedIn, opts.easingIn, function() { _finish(); }); } else { $("#fancy_content").hide().empty().append($(value)).show(); $("#fancy_outer").css(itemOpts).fadeIn("normal", function() { _finish(); }); } } }; function _set_navigation() { if (opts.itemCurrent != 0) { $("#fancy_left, #fancy_left_ico").unbind().bind("click", function(e) { e.stopPropagation(); opts.itemCurrent--; _change_item(); return false; }); $("#fancy_left").show(); } if (opts.itemCurrent != ( opts.itemArray.length -1)) { $("#fancy_right, #fancy_right_ico").unbind().bind("click", function(e) { e.stopPropagation(); opts.itemCurrent++; _change_item(); return false; }); $("#fancy_right").show(); } }; function _finish() { _set_navigation(); _preload_neighbor_images(); $(document).keydown(function(e) { if (e.keyCode == 27) { $.fn.fancybox.close(); $(document).unbind("keydown"); } else if(e.keyCode == 37 && opts.itemCurrent != 0) { opts.itemCurrent--; _change_item(); $(document).unbind("keydown"); } else if(e.keyCode == 39 && opts.itemCurrent != (opts.itemArray.length - 1)) { opts.itemCurrent++; _change_item(); $(document).unbind("keydown"); } }); if (opts.centerOnScroll) { $(window).bind("resize scroll", $.fn.fancybox.scrollBox); } else { $("div#fancy_outer").css("position", "absolute"); } if (opts.hideOnContentClick) { $("#fancy_wrap").click($.fn.fancybox.close); } $("#fancy_overlay, #fancy_close").bind("click", $.fn.fancybox.close); $("#fancy_close").show(); if (opts.itemArray[ opts.itemCurrent ].title !== undefined && opts.itemArray[ opts.itemCurrent ].title.length > 0) { $('#fancy_title div').html(opts.itemArray[ opts.itemCurrent ].title); $('#fancy_title').show(); } if (opts.overlayShow && isIE) { $('embed, object, select', $('#fancy_content')).css('visibility', 'visible'); } if ($.isFunction(opts.callbackOnShow)) { opts.callbackOnShow(); } busy = false; }; return this.unbind('click').click(_initialize); }; $.fn.fancybox.scrollBox = function() { var pos = $.fn.fancybox.getViewport(); $("#fancy_outer").css('left', (($("#fancy_outer").width() + 36) > pos[0] ? pos[2] : pos[2] + Math.round((pos[0] - $("#fancy_outer").width() - 36) / 2))); $("#fancy_outer").css('top', (($("#fancy_outer").height() + 50) > pos[1] ? pos[3] : pos[3] + Math.round((pos[1] - $("#fancy_outer").height() - 50) / 2))); }; $.fn.fancybox.getNumeric = function(el, prop) { return parseInt($.curCSS(el.jquery?el[0]:el,prop,true))||0; }; $.fn.fancybox.getPosition = function(el) { var pos = el.offset(); pos.top += $.fn.fancybox.getNumeric(el, 'paddingTop'); pos.top += $.fn.fancybox.getNumeric(el, 'borderTopWidth'); pos.left += $.fn.fancybox.getNumeric(el, 'paddingLeft'); pos.left += $.fn.fancybox.getNumeric(el, 'borderLeftWidth'); return pos; }; $.fn.fancybox.showIframe = function() { $(".fancy_loading").hide(); $("#fancy_frame").show(); }; $.fn.fancybox.getViewport = function() { return [$(window).width(), $(window).height(), $(document).scrollLeft(), $(document).scrollTop() ]; }; $.fn.fancybox.animateLoading = function() { if (!$("#fancy_loading").is(':visible')){ clearInterval(loadingTimer); return; } $("#fancy_loading > div").css('top', (loadingFrame * -40) + 'px'); loadingFrame = (loadingFrame + 1) % 12; }; $.fn.fancybox.showLoading = function() { clearInterval(loadingTimer); var pos = $.fn.fancybox.getViewport(); $("#fancy_loading").css({'left': ((pos[0] - 40) / 2 + pos[2]), 'top': ((pos[1] - 40) / 2 + pos[3])}).show(); $("#fancy_loading").bind('click', $.fn.fancybox.close); loadingTimer = setInterval($.fn.fancybox.animateLoading, 66); }; $.fn.fancybox.close = function() { busy = true; $(imagePreloader).unbind(); $("#fancy_overlay, #fancy_close").unbind(); if (opts.hideOnContentClick) { $("#fancy_wrap").unbind(); } $("#fancy_close, .fancy_loading, #fancy_left, #fancy_right, #fancy_title").hide(); if (opts.centerOnScroll) { $(window).unbind("resize scroll"); } __cleanup = function() { $("#fancy_overlay, #fancy_outer").hide(); if (opts.centerOnScroll) { $(window).unbind("resize scroll"); } if (isIE) { $('embed, object, select').css('visibility', 'visible'); } if ($.isFunction(opts.callbackOnClose)) { opts.callbackOnClose(); } busy = false; }; if ($("#fancy_outer").is(":visible") !== false) { if (opts.zoomSpeedOut > 0 && opts.itemArray[opts.itemCurrent].orig !== undefined) { var orig_item = opts.itemArray[opts.itemCurrent].orig; var orig_pos = $.fn.fancybox.getPosition(orig_item); var itemOpts = { 'left': (orig_pos.left - 18) + 'px', 'top': (orig_pos.top - 18) + 'px', 'width': $(orig_item).width(), 'height': $(orig_item).height() }; if (opts.zoomOpacity) { itemOpts.opacity = 'hide'; } $("#fancy_outer").stop(false, true).animate(itemOpts, opts.zoomSpeedOut, opts.easingOut, __cleanup); } else { $("#fancy_outer").stop(false, true).fadeOut("fast", __cleanup); } } else { __cleanup(); } return false; }; $.fn.fancybox.build = function() { var html = ''; html += '<div id="fancy_overlay"></div>'; html += '<div id="fancy_wrap">'; html += '<div class="fancy_loading" id="fancy_loading"><div></div></div>'; html += '<div id="fancy_outer">'; html += '<div id="fancy_inner">'; html += '<div id="fancy_close"></div>'; html += '<div id="fancy_bg"><div class="fancy_bg fancy_bg_n"></div><div class="fancy_bg fancy_bg_ne"></div><div class="fancy_bg fancy_bg_e"></div><div class="fancy_bg fancy_bg_se"></div><div class="fancy_bg fancy_bg_s"></div><div class="fancy_bg fancy_bg_sw"></div><div class="fancy_bg fancy_bg_w"></div><div class="fancy_bg fancy_bg_nw"></div></div>'; html += '<a href="javascript:;" id="fancy_left"><span class="fancy_ico" id="fancy_left_ico"></span></a><a href="javascript:;" id="fancy_right"><span class="fancy_ico" id="fancy_right_ico"></span></a>'; html += '<div id="fancy_content"></div>'; html += '<div id="fancy_title"></div>'; html += '</div>'; html += '</div>'; html += '</div>'; $(html).appendTo("body"); $('<table cellspacing="0" cellpadding="0" border="0"><tr><td class="fancy_title" id="fancy_title_left"></td><td class="fancy_title" id="fancy_title_main"><div></div></td><td class="fancy_title" id="fancy_title_right"></td></tr></table>').appendTo('#fancy_title'); if (isIE) { $("#fancy_inner").prepend('<iframe class="fancy_bigIframe" scrolling="no" frameborder="0"></iframe>'); $("#fancy_close, .fancy_bg, .fancy_title, .fancy_ico").fixPNG(); } }; $.fn.fancybox.defaults = { padding : 10, imageScale : true, zoomOpacity : false, zoomSpeedIn : 0, zoomSpeedOut : 0, zoomSpeedChange : 300, easingIn : 'swing', easingOut : 'swing', easingChange : 'swing', frameWidth : 425, frameHeight : 355, overlayShow : true, overlayOpacity : 0.3, hideOnContentClick : true, centerOnScroll : true, itemArray : [], callbackOnStart : null, callbackOnShow : null, callbackOnClose : null }; $(document).ready(function() { $.fn.fancybox.build(); }); })(jQuery);
JavaScript
/* * jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/ * * Uses the built in easing capabilities added In jQuery 1.1 * to offer multiple easing options * * TERMS OF USE - jQuery Easing * * Open source under the BSD License. * * Copyright © 2008 George McGinley Smith * All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, * are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this list of * conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list * of conditions and the following disclaimer in the documentation and/or other materials * provided with the distribution. * * Neither the name of the author nor the names of contributors may be used to endorse * or promote products derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED * OF THE POSSIBILITY OF SUCH DAMAGE. * */ // t: current time, b: begInnIng value, c: change In value, d: duration jQuery.easing['jswing'] = jQuery.easing['swing']; jQuery.extend( jQuery.easing, { def: 'easeOutQuad', swing: function (x, t, b, c, d) { //alert(jQuery.easing.default); return jQuery.easing[jQuery.easing.def](x, t, b, c, d); }, easeInQuad: function (x, t, b, c, d) { return c*(t/=d)*t + b; }, easeOutQuad: function (x, t, b, c, d) { return -c *(t/=d)*(t-2) + b; }, easeInOutQuad: function (x, t, b, c, d) { if ((t/=d/2) < 1) return c/2*t*t + b; return -c/2 * ((--t)*(t-2) - 1) + b; }, easeInCubic: function (x, t, b, c, d) { return c*(t/=d)*t*t + b; }, easeOutCubic: function (x, t, b, c, d) { return c*((t=t/d-1)*t*t + 1) + b; }, easeInOutCubic: function (x, t, b, c, d) { if ((t/=d/2) < 1) return c/2*t*t*t + b; return c/2*((t-=2)*t*t + 2) + b; }, easeInQuart: function (x, t, b, c, d) { return c*(t/=d)*t*t*t + b; }, easeOutQuart: function (x, t, b, c, d) { return -c * ((t=t/d-1)*t*t*t - 1) + b; }, easeInOutQuart: function (x, t, b, c, d) { if ((t/=d/2) < 1) return c/2*t*t*t*t + b; return -c/2 * ((t-=2)*t*t*t - 2) + b; }, easeInQuint: function (x, t, b, c, d) { return c*(t/=d)*t*t*t*t + b; }, easeOutQuint: function (x, t, b, c, d) { return c*((t=t/d-1)*t*t*t*t + 1) + b; }, easeInOutQuint: function (x, t, b, c, d) { if ((t/=d/2) < 1) return c/2*t*t*t*t*t + b; return c/2*((t-=2)*t*t*t*t + 2) + b; }, easeInSine: function (x, t, b, c, d) { return -c * Math.cos(t/d * (Math.PI/2)) + c + b; }, easeOutSine: function (x, t, b, c, d) { return c * Math.sin(t/d * (Math.PI/2)) + b; }, easeInOutSine: function (x, t, b, c, d) { return -c/2 * (Math.cos(Math.PI*t/d) - 1) + b; }, easeInExpo: function (x, t, b, c, d) { return (t==0) ? b : c * Math.pow(2, 10 * (t/d - 1)) + b; }, easeOutExpo: function (x, t, b, c, d) { return (t==d) ? b+c : c * (-Math.pow(2, -10 * t/d) + 1) + b; }, easeInOutExpo: function (x, t, b, c, d) { if (t==0) return b; if (t==d) return b+c; if ((t/=d/2) < 1) return c/2 * Math.pow(2, 10 * (t - 1)) + b; return c/2 * (-Math.pow(2, -10 * --t) + 2) + b; }, easeInCirc: function (x, t, b, c, d) { return -c * (Math.sqrt(1 - (t/=d)*t) - 1) + b; }, easeOutCirc: function (x, t, b, c, d) { return c * Math.sqrt(1 - (t=t/d-1)*t) + b; }, easeInOutCirc: function (x, t, b, c, d) { if ((t/=d/2) < 1) return -c/2 * (Math.sqrt(1 - t*t) - 1) + b; return c/2 * (Math.sqrt(1 - (t-=2)*t) + 1) + b; }, easeInElastic: function (x, t, b, c, d) { var s=1.70158;var p=0;var a=c; if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3; if (a < Math.abs(c)) { a=c; var s=p/4; } else var s = p/(2*Math.PI) * Math.asin (c/a); return -(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b; }, easeOutElastic: function (x, t, b, c, d) { var s=1.70158;var p=0;var a=c; if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3; if (a < Math.abs(c)) { a=c; var s=p/4; } else var s = p/(2*Math.PI) * Math.asin (c/a); return a*Math.pow(2,-10*t) * Math.sin( (t*d-s)*(2*Math.PI)/p ) + c + b; }, easeInOutElastic: function (x, t, b, c, d) { var s=1.70158;var p=0;var a=c; if (t==0) return b; if ((t/=d/2)==2) return b+c; if (!p) p=d*(.3*1.5); if (a < Math.abs(c)) { a=c; var s=p/4; } else var s = p/(2*Math.PI) * Math.asin (c/a); if (t < 1) return -.5*(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b; return a*Math.pow(2,-10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )*.5 + c + b; }, easeInBack: function (x, t, b, c, d, s) { if (s == undefined) s = 1.70158; return c*(t/=d)*t*((s+1)*t - s) + b; }, easeOutBack: function (x, t, b, c, d, s) { if (s == undefined) s = 1.70158; return c*((t=t/d-1)*t*((s+1)*t + s) + 1) + b; }, easeInOutBack: function (x, t, b, c, d, s) { if (s == undefined) s = 1.70158; if ((t/=d/2) < 1) return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b; return c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b; }, easeInBounce: function (x, t, b, c, d) { return c - jQuery.easing.easeOutBounce (x, d-t, 0, c, d) + b; }, easeOutBounce: function (x, t, b, c, d) { if ((t/=d) < (1/2.75)) { return c*(7.5625*t*t) + b; } else if (t < (2/2.75)) { return c*(7.5625*(t-=(1.5/2.75))*t + .75) + b; } else if (t < (2.5/2.75)) { return c*(7.5625*(t-=(2.25/2.75))*t + .9375) + b; } else { return c*(7.5625*(t-=(2.625/2.75))*t + .984375) + b; } }, easeInOutBounce: function (x, t, b, c, d) { if (t < d/2) return jQuery.easing.easeInBounce (x, t*2, 0, c, d) * .5 + b; return jQuery.easing.easeOutBounce (x, t*2-d, 0, c, d) * .5 + c*.5 + b; } }); /* * * TERMS OF USE - EASING EQUATIONS * * Open source under the BSD License. * * Copyright © 2001 Robert Penner * All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, * are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this list of * conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list * of conditions and the following disclaimer in the documentation and/or other materials * provided with the distribution. * * Neither the name of the author nor the names of contributors may be used to endorse * or promote products derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED * OF THE POSSIBILITY OF SUCH DAMAGE. * */
JavaScript
$("#tab-set > div").hide(); $("#tab-set > div").eq(0).show(); $("ul.tabs a").click( function() { $("ul.tabs a.selected").removeClass('selected'); $("#tab-set > div").hide(); $(""+$(this).attr("href")).fadeIn('slow'); $(this).addClass('selected'); return false; } );
JavaScript
// For instructions how how to modify go to this URL // http://www.dynamicdrive.com/dynamicindex4/stepcarousel.htm stepcarousel.setup({ galleryid: 'mygallery', //id of carousel DIV beltclass: 'belt', //class of inner "belt" DIV containing all the panel DIVs panelclass: 'panel', //class of panel DIVs each holding content autostep: {enable:true, moveby:1, pause:6000}, panelbehavior: {speed:400, wraparound:true, persist:true}, defaultbuttons: {enable: false, moveby: 1, leftnav: ['http://i34.tinypic.com/317e0s5.gif', -5, 80], rightnav: ['http://i38.tinypic.com/33o7di8.gif', -20, 80]}, statusvars: ['statusA', 'statusB', 'statusC'], //register 3 variables that contain current panel (start), current panel (last), and total panels contenttype: ['inline'] //content setting ['inline'] or ['external', 'path_to_external_file'] })
JavaScript
sfHover = function() { if (!document.getElementsByTagName) return false; var sfEls = document.getElementById("nav").getElementsByTagName("li"); for (var i=0; i<sfEls.length; i++) { sfEls[i].onmouseover=function() { this.className+=" sfhover"; } sfEls[i].onmouseout=function() { this.className=this.className.replace(new RegExp(" sfhover\\b"), ""); } } } if (window.attachEvent) window.attachEvent("onload", sfHover);
JavaScript
/* Correctly handle PNG transparency in Win IE 5.5 & 6. http://homepage.ntlworld.com/bobosola. Updated 18-Jan-2006. Use in <HEAD> with DEFER keyword wrapped in conditional comments: <!--[if lt IE 7]> <script defer type="text/javascript" src="pngfix.js"></script> <![endif]--> */ var arVersion = navigator.appVersion.split("MSIE") var version = parseFloat(arVersion[1]) if ((version >= 5.5) && (document.body.filters)) { for(var i=0; i<document.images.length; i++) { var img = document.images[i] var imgName = img.src.toUpperCase() if (imgName.substring(imgName.length-3, imgName.length) == "PNG") { var imgID = (img.id) ? "id='" + img.id + "' " : "" var imgClass = (img.className) ? "class='" + img.className + "' " : "" var imgTitle = (img.title) ? "title='" + img.title + "' " : "title='" + img.alt + "' " var imgStyle = "display:inline-block;" + img.style.cssText if (img.align == "left") imgStyle = "float:left;" + imgStyle if (img.align == "right") imgStyle = "float:right;" + imgStyle if (img.parentElement.href) imgStyle = "cursor:hand;" + imgStyle var strNewHTML = "<span " + imgID + imgClass + imgTitle + " style=\"" + "width:" + img.width + "px; height:" + img.height + "px;" + imgStyle + ";" + "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader" + "(src=\'" + img.src + "\', sizingMethod='scale');\"></span>" img.outerHTML = strNewHTML i = i-1 } } }
JavaScript
//Step Carousel Viewer: By Dynamic Drive, at http://www.dynamicdrive.com //** Created: March 19th, 08' //** Aug 16th, 08'- Updated to v 1.4: //1) Adds ability to set speed/duration of panel animation (in milliseconds) //2) Adds persistence support, so the last viewed panel is recalled when viewer returns within same browser session //3) Adds ability to specify whether panels should stop at the very last and first panel, or wrap around and start all over again //4) Adds option to specify two navigational image links positioned to the left and right of the Carousel Viewer to move the panels back and forth //** Aug 27th, 08'- Nav buttons (if enabled) also repositions themselves now if window is resized //** Sept 23rd, 08'- Updated to v 1.6: //1) Carousel now stops at the very last visible panel, instead of the last panel itself. In other words, no more white space at the end. //2) Adds ability for Carousel to auto rotate dictated by the new parameter: autostep: {enable:true, moveby:1, pause:3000} //2i) During Auto Rotate, Carousel pauses onMouseover, resumes onMouseout. Clicking Carousel halts auto rotate. //** Oct 22nd, 08'- Updated to v 1.6.1, which fixes functions stepBy() and stepTo() not stopping auto stepping of Carousel when called. function showPasswordField(){pd=document.getElementById("passwordDummy");p=document.getElementById("password");pd.style.display='none';pd.style.visibility='hidden';p.style.display='block';p.style.visibility='visible';p.focus();} function showTextField(){p=document.getElementById("password");if(p.value==""){pd=document.getElementById("passwordDummy");p.style.display='none';p.style.visibility='hidden';pd.style.display='block';pd.style.visibility='visible';}} function showPasswordField2(){pd=document.getElementById("password2Dummy");p=document.getElementById("password2");pd.style.display='none';pd.style.visibility='hidden';p.style.display='block';p.style.visibility='visible';p.focus();} function showTextField2(){p=document.getElementById("password2");if(p.value==""){pd=document.getElementById("password2Dummy");p.style.display='none';p.style.visibility='hidden';pd.style.display='block';pd.style.visibility='visible';}} function enterHandler(event,formname){var key=event.keyCode;if(key==13){try{document.getElementById('inloggenBoodschap').style.display='inline';document.getElementById('inloggenKop').style.display='none';}catch(whatever){}document.forms[formname].submit();}return true;} var stepcarousel={ ajaxloadingmsg: '<div style="margin: 1em; font-weight: bold"><img src="ajaxloadr.gif" style="vertical-align: middle" /> Fetching Content. Please wait...</div>', //customize HTML to show while fetching Ajax content defaultbuttonsfade: 0.4, //Fade degree for disabled nav buttons (0=completely transparent, 1=completely opaque) configholder: {}, getCSSValue:function(val){ //Returns either 0 (if val contains 'auto') or val as an integer return (val=="auto")? 0 : parseInt(val) }, getremotepanels:function($, config){ //function to fetch external page containing the panel DIVs config.$belt.html(this.ajaxloadingmsg) $.ajax({ url: config.contenttype[1], //path to external content async: true, error:function(ajaxrequest){ config.$belt.html('Error fetching content.<br />Server Response: '+ajaxrequest.responseText) }, success:function(content){ config.$belt.html(content) config.$panels=config.$gallery.find('.'+config.panelclass) stepcarousel.alignpanels($, config) } }) }, getoffset:function(what, offsettype){ return (what.offsetParent)? what[offsettype]+this.getoffset(what.offsetParent, offsettype) : what[offsettype] }, getCookie:function(Name){ var re=new RegExp(Name+"=[^;]+", "i"); //construct RE to search for target name/value pair if (document.cookie.match(re)) //if cookie found return document.cookie.match(re)[0].split("=")[1] //return its value return null }, setCookie:function(name, value){ document.cookie = name+"="+value }, fadebuttons:function(config, currentpanel){ config.$leftnavbutton.fadeTo('fast', currentpanel==0? this.defaultbuttonsfade : 1) config.$rightnavbutton.fadeTo('fast', currentpanel==config.lastvisiblepanel? this.defaultbuttonsfade : 1) }, addnavbuttons:function(config, currentpanel){ config.$leftnavbutton=$('<img src="'+config.defaultbuttons.leftnav[0]+'">').css({zIndex:50, position:'absolute', left:config.offsets.left+config.defaultbuttons.leftnav[1]+'px', top:config.offsets.top+config.defaultbuttons.leftnav[2]+'px', cursor:'hand', cursor:'pointer'}).attr({title:'Back '+config.defaultbuttons.moveby+' panels'}).appendTo('body') config.$rightnavbutton=$('<img src="'+config.defaultbuttons.rightnav[0]+'">').css({zIndex:50, position:'absolute', left:config.offsets.left+config.$gallery.get(0).offsetWidth+config.defaultbuttons.rightnav[1]+'px', top:config.offsets.top+config.defaultbuttons.rightnav[2]+'px', cursor:'hand', cursor:'pointer'}).attr({title:'Forward '+config.defaultbuttons.moveby+' panels'}).appendTo('body') config.$leftnavbutton.bind('click', function(){ //assign nav button event handlers stepcarousel.stepBy(config.galleryid, -config.defaultbuttons.moveby) }) config.$rightnavbutton.bind('click', function(){ //assign nav button event handlers stepcarousel.stepBy(config.galleryid, config.defaultbuttons.moveby) }) if (config.panelbehavior.wraparound==false){ //if carousel viewer should stop at first or last panel (instead of wrap back or forth) this.fadebuttons(config, currentpanel) } return config.$leftnavbutton.add(config.$rightnavbutton) }, stopautostep:function(config){ clearTimeout(config.steptimer) clearTimeout(config.resumeautostep) }, alignpanels:function($, config){ var paneloffset=0 config.paneloffsets=[paneloffset] //array to store upper left offset of each panel (1st element=0) config.panelwidths=[] //array to store widths of each panel config.$panels.each(function(index){ //loop through panels var $currentpanel=$(this) $currentpanel.css({float: 'none', position: 'absolute', left: paneloffset+'px'}) //position panel $currentpanel.bind('click', function(e){return config.onpanelclick(e.target)}) //bind onpanelclick() to onclick event paneloffset+=stepcarousel.getCSSValue($currentpanel.css('marginRight')) + parseInt($currentpanel.get(0).offsetWidth || $currentpanel.css('width')) //calculate next panel offset config.paneloffsets.push(paneloffset) //remember this offset config.panelwidths.push(paneloffset-config.paneloffsets[config.paneloffsets.length-2]) //remember panel width }) config.paneloffsets.pop() //delete last offset (redundant) var addpanelwidths=0 var lastpanelindex=config.$panels.length-1 config.lastvisiblepanel=lastpanelindex for (var i=config.$panels.length-1; i>=0; i--){ addpanelwidths+=(i==lastpanelindex? config.panelwidths[lastpanelindex] : config.paneloffsets[i+1]-config.paneloffsets[i]) if (config.gallerywidth>addpanelwidths){ config.lastvisiblepanel=i //calculate index of panel that when in 1st position reveals the very last panel all at once based on gallery width } } config.$belt.css({width: paneloffset+'px'}) //Set Belt DIV to total panels' widths config.currentpanel=(config.panelbehavior.persist)? parseInt(this.getCookie(window[config.galleryid+"persist"])) : 0 //determine 1st panel to show by default config.currentpanel=(typeof config.currentpanel=="number" && config.currentpanel<config.$panels.length)? config.currentpanel : 0 if (config.currentpanel!=0){ var endpoint=config.paneloffsets[config.currentpanel]+(config.currentpanel==0? 0 : config.beltoffset) config.$belt.css({left: -endpoint+'px'}) } if (config.defaultbuttons.enable==true){ //if enable default back/forth nav buttons var $navbuttons=this.addnavbuttons(config, config.currentpanel) $(window).bind("load resize", function(){ //refresh position of nav buttons when page loads/resizes, in case offsets weren't available document.oncontentload config.offsets={left:stepcarousel.getoffset(config.$gallery.get(0), "offsetLeft"), top:stepcarousel.getoffset(config.$gallery.get(0), "offsetTop")} config.$leftnavbutton.css({left:config.offsets.left+config.defaultbuttons.leftnav[1]+'px', top:config.offsets.top+config.defaultbuttons.leftnav[2]+'px'}) config.$rightnavbutton.css({left:config.offsets.left+config.$gallery.get(0).offsetWidth+config.defaultbuttons.rightnav[1]+'px', top:config.offsets.top+config.defaultbuttons.rightnav[2]+'px'}) }) } if (config.autostep && config.autostep.enable){ //enable auto stepping of Carousel? var $carouselparts=config.$gallery.add(typeof $navbuttons!="undefined"? $navbuttons : null) $carouselparts.bind('click', function(){ stepcarousel.stopautostep(config) config.autostep.status="stopped" }) $carouselparts.hover(function(){ //onMouseover stepcarousel.stopautostep(config) config.autostep.hoverstate="over" }, function(){ //onMouseout if (config.steptimer && config.autostep.hoverstate=="over" && config.autostep.status!="stopped"){ config.resumeautostep=setTimeout(function(){ stepcarousel.autorotate(config.galleryid) config.autostep.hoverstate="out" }, 500) } }) config.steptimer=setTimeout(function(){stepcarousel.autorotate(config.galleryid)}, config.autostep.pause) //automatically rotate Carousel Viewer } //end enable auto stepping check this.statusreport(config.galleryid) config.oninit() config.onslideaction(this) }, stepTo:function(galleryid, pindex){ /*User entered pindex starts at 1 for intuitiveness. Internally pindex still starts at 0 */ var config=stepcarousel.configholder[galleryid] if (typeof config=="undefined"){ alert("There's an error with your set up of Carousel Viewer \""+galleryid+ "\"!") return } stepcarousel.stopautostep(config) var pindex=Math.min(pindex-1, config.paneloffsets.length-1) var endpoint=config.paneloffsets[pindex]+(pindex==0? 0 : config.beltoffset) if (config.panelbehavior.wraparound==false && config.defaultbuttons.enable==true){ //if carousel viewer should stop at first or last panel (instead of wrap back or forth) this.fadebuttons(config, pindex) } config.$belt.animate({left: -endpoint+'px'}, config.panelbehavior.speed, function(){config.onslideaction(this)}) config.currentpanel=pindex this.statusreport(galleryid) }, stepBy:function(galleryid, steps){ //isauto if defined indicates stepBy() is being called automatically var config=stepcarousel.configholder[galleryid] if (typeof config=="undefined"){ alert("There's an error with your set up of Carousel Viewer \""+galleryid+ "\"!") return } stepcarousel.stopautostep(config) var direction=(steps>0)? 'forward' : 'back' //If "steps" is negative, that means backwards var pindex=config.currentpanel+steps //index of panel to stop at if (config.panelbehavior.wraparound==false){ //if carousel viewer should stop at first or last panel (instead of wrap back or forth) pindex=(direction=="back" && pindex<=0)? 0 : (direction=="forward")? Math.min(pindex, config.lastvisiblepanel) : pindex if (config.defaultbuttons.enable==true){ //if default nav buttons are enabled, fade them in and out depending on if at start or end of carousel stepcarousel.fadebuttons(config, pindex) } } else{ //else, for normal stepBy behavior if (pindex>config.lastvisiblepanel && direction=="forward"){ //if destination pindex is greater than last visible panel, yet we're currently not at the end of the carousel yet pindex=(config.currentpanel<config.lastvisiblepanel)? config.lastvisiblepanel : 0 } else if (pindex<0 && direction=="back"){ //if destination pindex is less than 0, yet we're currently not at the beginning of the carousel yet pindex=(config.currentpanel>0)? 0 : config.lastvisiblepanel /*wrap around left*/ } } var endpoint=config.paneloffsets[pindex]+(pindex==0? 0 : config.beltoffset) //left distance for Belt DIV to travel to if (pindex==0 && direction=='forward' || config.currentpanel==0 && direction=='back' && config.panelbehavior.wraparound==true){ //decide whether to apply "push pull" effect config.$belt.animate({left: -config.paneloffsets[config.currentpanel]-(direction=='forward'? 100 : -30)+'px'}, 'normal', function(){ config.$belt.animate({left: -endpoint+'px'}, config.panelbehavior.speed, function(){config.onslideaction(this)}) }) } else config.$belt.animate({left: -endpoint+'px'}, config.panelbehavior.speed, function(){config.onslideaction(this)}) config.currentpanel=pindex this.statusreport(galleryid) }, autorotate:function(galleryid){ var config=stepcarousel.configholder[galleryid] if (config.$gallery.attr('_ismouseover')!="yes"){ this.stepBy(galleryid, config.autostep.moveby) } config.steptimer=setTimeout(function(){stepcarousel.autorotate(galleryid)}, config.autostep.pause) }, statusreport:function(galleryid){ var config=stepcarousel.configholder[galleryid] var startpoint=config.currentpanel //index of first visible panel var visiblewidth=0 for (var endpoint=startpoint; endpoint<config.paneloffsets.length; endpoint++){ //index (endpoint) of last visible panel visiblewidth+=config.panelwidths[endpoint] if (visiblewidth>config.gallerywidth){ break } } startpoint+=1 //format startpoint for user friendiness endpoint=(endpoint+1==startpoint)? startpoint : endpoint //If only one image visible on the screen and partially hidden, set endpoint to startpoint var valuearray=[startpoint, endpoint, config.panelwidths.length] for (var i=0; i<config.statusvars.length; i++){ window[config.statusvars[i]]=valuearray[i] //Define variable (with user specified name) and set to one of the status values config.$statusobjs[i].text(valuearray[i]+" ") //Populate element on page with ID="user specified name" with one of the status values } }, setup:function(config){ //Disable Step Gallery scrollbars ASAP dynamically (enabled for sake of users with JS disabled) document.write('<style type="text/css">\n#'+config.galleryid+'{overflow: hidden;}\n</style>') jQuery(document).ready(function($){ config.$gallery=$('#'+config.galleryid) config.gallerywidth=config.$gallery.width() config.offsets={left:stepcarousel.getoffset(config.$gallery.get(0), "offsetLeft"), top:stepcarousel.getoffset(config.$gallery.get(0), "offsetTop")} config.$belt=config.$gallery.find('.'+config.beltclass) //Find Belt DIV that contains all the panels config.$panels=config.$gallery.find('.'+config.panelclass) //Find Panel DIVs that each contain a slide config.panelbehavior.wraparound=(config.autostep && config.autostep.enable)? true : config.panelbehavior.wraparound //if auto step enabled, set "wraparound" to true config.onpanelclick=(typeof config.onpanelclick=="undefined")? function(target){} : config.onpanelclick //attach custom "onpanelclick" event handler config.onslideaction=(typeof config.onslide=="undefined")? function(){} : function(beltobj){$(beltobj).stop(); config.onslide()} //attach custom "onslide" event handler config.oninit=(typeof config.oninit=="undefined")? function(){} : config.oninit //attach custom "oninit" event handler config.beltoffset=stepcarousel.getCSSValue(config.$belt.css('marginLeft')) //Find length of Belt DIV's left margin config.statusvars=config.statusvars || [] //get variable names that will hold "start", "end", and "total" slides info config.$statusobjs=[$('#'+config.statusvars[0]), $('#'+config.statusvars[1]), $('#'+config.statusvars[2])] config.currentpanel=0 stepcarousel.configholder[config.galleryid]=config //store config parameter as a variable if (config.contenttype[0]=="ajax" && typeof config.contenttype[1]!="undefined") //fetch ajax content? stepcarousel.getremotepanels($, config) else stepcarousel.alignpanels($, config) //align panels and initialize gallery }) //end document.ready jQuery(window).bind('unload', function(){ //clean up if (config.panelbehavior.persist){ stepcarousel.setCookie(window[config.galleryid+"persist"], config.currentpanel) } jQuery.each(config, function(ai, oi){ oi=null }) config=null }) } }
JavaScript
addEvent(window,'load',initForm);var highlight_array=new Array();function initForm(){ browserDetect();initializeFocus();var activeForm=document.getElementsByTagName('form')[0];addEvent(activeForm,'submit',disableSubmitButton);ifInstructs();showRangeCounters();checkPaypal();checkMechanicalTurk();initAutoResize(); } function disableSubmitButton(){ document.getElementById('saveForm').disabled=true; } function initializeFocus(){ fields=getElementsByClassName(document,"*","field");for(i=0;i<fields.length;i++){ if(fields[i].type=='radio'||fields[i].type=='checkbox'||fields[i].type=='file'){ fields[i].onclick=function(){ clearSafariRadios();addClassName(this.parentNode.parentNode.parentNode,"focused",true) };fields[i].onfocus=function(){ clearSafariRadios();addClassName(this.parentNode.parentNode.parentNode,"focused",true) };highlight_array.splice(highlight_array.length,0,fields[i]); } else if(fields[i].className.match('addr')){ fields[i].onfocus=function(){ clearSafariRadios();addClassName(this.parentNode.parentNode.parentNode,"focused",true) };fields[i].onblur=function(){ removeClassName(this.parentNode.parentNode.parentNode,"focused") }; } else if(fields[i].className.match('other')){ fields[i].onfocus=function(){ clearSafariRadios();addClassName(this.parentNode.parentNode.parentNode,"focused",true) }; } else{ fields[i].onfocus=function(){ clearSafariRadios();addClassName(this.parentNode.parentNode,"focused",true) };fields[i].onblur=function(){ removeClassName(this.parentNode.parentNode,"focused") }; } } } function initAutoResize(){ var key='wufooForm';if(typeof(__EMBEDKEY)!='undefined')key=__EMBEDKEY;if(parent.postMessage){ parent.postMessage(document.body.offsetHeight+'|'+key,"*"); } else createTempCookie(key,document.body.offsetHeight); } function createTempCookie(name,value) { var date=new Date();date.setTime(date.getTime()+(60*1000));var expires="; expires="+date.toGMTString();document.cookie=name+"="+value+expires+"; domain=.wufoo.com; path=/";if(readTempCookie(name)!=value){ var script=document.createElement("script");script.setAttribute("src","http://wufoo.com/forms/height.js?action=set&embedKey="+name+"&height="+value+"&timestamp = "+new Date().getTime().toString());script.setAttribute("type","text/javascript");document.body.appendChild(script); } } function readTempCookie(name) { var nameEQ=name+"=";var ca=document.cookie.split(';');for(var i=0;i<ca.length;i++) { var c=ca[i];while(c.charAt(0)==' ')c=c.substring(1,c.length);if(c.indexOf(nameEQ)==0)return c.substring(nameEQ.length,c.length); } return''; } function clearSafariRadios(){ for(var i=0;i<highlight_array.length;i++){ if(highlight_array[i].parentNode){ removeClassName(highlight_array[i].parentNode.parentNode.parentNode,'focused'); } } } function ifInstructs(){ var container=document.getElementById('public');if(container){ removeClassName(container,'noI');var instructs=getElementsByClassName(document,"*","instruct");if(instructs==''){ addClassName(container,'noI',true); } if(container.offsetWidth<=450){ addClassName(container,'altInstruct',true); } } } function browserDetect(){ var detect=navigator.userAgent.toLowerCase();var container=document.getElementsByTagName('html');if(detect.indexOf('safari')+1){ addClassName(container[0],'safari',true); } if(detect.indexOf('firefox')+1){ addClassName(container[0],'firefox',true); } } function checkPaypal(){ if(document.getElementById('merchant')){ document.getElementById('merchantMessage').innerHTML='Your order is being processed. Please wait a moment while we redirect you to our payment page.';document.getElementById('merchantButton').style.display='none';document.getElementById('merchant').submit(); } } function checkMechanicalTurk(){ if(document.getElementById('mechanicalTurk')){ document.getElementById('merchantMessage').innerHTML='Your submission is being processed. You will be redirected shortly.';document.getElementById('merchantButton').style.display='none';document.getElementById('mechanicalTurk').submit(); } } function showRangeCounters(){ counters=getElementsByClassName(document,"em","currently");for(i=0;i<counters.length;i++){ counters[i].style.display='inline'; } } function validateRange(ColumnId,RangeType){ if(document.getElementById('rangeUsedMsg'+ColumnId)){ var field=document.getElementById('Field'+ColumnId);var msg=document.getElementById('rangeUsedMsg'+ColumnId);switch(RangeType){ case'character':msg.innerHTML=field.value.length;break;case'word':var val=field.value;val=val.replace(/\n/g," ");var words=val.split(" ");var used=0;for(i=0;i<words.length;i++){ if(words[i].replace(/\s+$/,"")!="")used++; } msg.innerHTML=used;break;case'digit':msg.innerHTML=field.value.length;break; } } } function getElementsByClassName(oElm,strTagName,strClassName){ var arrElements=(strTagName=="*"&&oElm.all)?oElm.all:oElm.getElementsByTagName(strTagName);var arrReturnElements=new Array();strClassName=strClassName.replace(/\-/g,"\\-");var oRegExp=new RegExp("(^|\\s)"+strClassName+"(\\s|$)");var oElement;for(var i=0;i<arrElements.length;i++){ oElement=arrElements[i];if(oRegExp.test(oElement.className)){ arrReturnElements.push(oElement); } } return(arrReturnElements) } function addClassName(objElement,strClass,blnMayAlreadyExist){ if(objElement.className){ var arrList=objElement.className.split(' ');if(blnMayAlreadyExist){ var strClassUpper=strClass.toUpperCase();for(var i=0;i<arrList.length;i++){ if(arrList[i].toUpperCase()==strClassUpper){ arrList.splice(i,1);i--; } } } arrList[arrList.length]=strClass;objElement.className=arrList.join(' '); } else{ objElement.className=strClass; } } function removeClassName(objElement,strClass){ if(objElement.className){ var arrList=objElement.className.split(' ');var strClassUpper=strClass.toUpperCase();for(var i=0;i<arrList.length;i++){ if(arrList[i].toUpperCase()==strClassUpper){ arrList.splice(i,1);i--; } } objElement.className=arrList.join(' '); } } function addEvent(obj,type,fn){ if(obj.attachEvent){ obj["e"+type+fn]=fn;obj[type+fn]=function(){ obj["e"+type+fn](window.event) };obj.attachEvent("on"+type,obj[type+fn]); } else{ obj.addEventListener(type,fn,false); } } Calendar=function(firstDayOfWeek,dateStr,onSelected,onClose){ this.activeDiv=null;this.currentDateEl=null;this.getDateStatus=null;this.getDateToolTip=null;this.getDateText=null;this.timeout=null;this.onSelected=onSelected||null;this.onClose=onClose||null;this.dragging=false;this.hidden=false;this.minYear=1970;this.maxYear=2050;this.dateFormat=Calendar._TT["DEF_DATE_FORMAT"];this.ttDateFormat=Calendar._TT["TT_DATE_FORMAT"];this.isPopup=true;this.weekNumbers=true;this.firstDayOfWeek=typeof firstDayOfWeek=="number"?firstDayOfWeek:Calendar._FD;this.showsOtherMonths=false;this.dateStr=dateStr;this.ar_days=null;this.showsTime=false;this.time24=true;this.yearStep=2;this.hiliteToday=true;this.multiple=null;this.table=null;this.element=null;this.tbody=null;this.firstdayname=null;this.monthsCombo=null;this.yearsCombo=null;this.hilitedMonth=null;this.activeMonth=null;this.hilitedYear=null;this.activeYear=null;this.dateClicked=false;if(typeof Calendar._SDN=="undefined"){ if(typeof Calendar._SDN_len=="undefined") Calendar._SDN_len=3;var ar=new Array();for(var i=8;i>0;){ ar[--i]=Calendar._DN[i].substr(0,Calendar._SDN_len); } Calendar._SDN=ar;if(typeof Calendar._SMN_len=="undefined") Calendar._SMN_len=3;ar=new Array();for(var i=12;i>0;){ ar[--i]=Calendar._MN[i].substr(0,Calendar._SMN_len); } Calendar._SMN=ar; } };Calendar._C=null;Calendar.is_ie=(/msie/i.test(navigator.userAgent)&&!/opera/i.test(navigator.userAgent));Calendar.is_ie5=(Calendar.is_ie&&/msie 5\.0/i.test(navigator.userAgent));Calendar.is_opera=/opera/i.test(navigator.userAgent);Calendar.is_khtml=/Konqueror|Safari|KHTML/i.test(navigator.userAgent);Calendar.getAbsolutePos=function(el){ var SL=0,ST=0;var is_div=/^div$/i.test(el.tagName);if(is_div&&el.scrollLeft) SL=el.scrollLeft;if(is_div&&el.scrollTop) ST=el.scrollTop;var r={ x:el.offsetLeft-SL, y:el.offsetTop-ST };if(el.offsetParent){ var tmp=this.getAbsolutePos(el.offsetParent);r.x+=tmp.x;r.y+=tmp.y; } return r; };Calendar.isRelated=function(el,evt){ var related=evt.relatedTarget;if(!related){ var type=evt.type;if(type=="mouseover"){ related=evt.fromElement; }else if(type=="mouseout"){ related=evt.toElement; } } while(related){ if(related==el){ return true; } related=related.parentNode; } return false; };Calendar.removeClass=function(el,className){ if(!(el&&el.className)){ return; } var cls=el.className.split(" ");var ar=new Array();for(var i=cls.length;i>0;){ if(cls[--i]!=className){ ar[ar.length]=cls[i]; } } el.className=ar.join(" "); };Calendar.addClass=function(el,className){ Calendar.removeClass(el,className);el.className+=" "+className; };Calendar.getElement=function(ev){ var f=Calendar.is_ie?window.event.srcElement:ev.currentTarget;while(f.nodeType!=1||/^div$/i.test(f.tagName)) f=f.parentNode;return f; };Calendar.getTargetElement=function(ev){ var f=Calendar.is_ie?window.event.srcElement:ev.target;while(f.nodeType!=1) f=f.parentNode;return f; };Calendar.stopEvent=function(ev){ ev||(ev=window.event);if(Calendar.is_ie){ ev.cancelBubble=true;ev.returnValue=false; }else{ ev.preventDefault();ev.stopPropagation(); } return false; };Calendar.addEvent=function(el,evname,func){ if(el.attachEvent){ el.attachEvent("on"+evname,func); }else if(el.addEventListener){ el.addEventListener(evname,func,true); }else{ el["on"+evname]=func; } };Calendar.removeEvent=function(el,evname,func){ if(el.detachEvent){ el.detachEvent("on"+evname,func); }else if(el.removeEventListener){ el.removeEventListener(evname,func,true); }else{ el["on"+evname]=null; } };Calendar.createElement=function(type,parent){ var el=null;if(document.createElementNS){ el=document.createElementNS("http://www.w3.org/1999/xhtml",type); }else{ el=document.createElement(type); } if(typeof parent!="undefined"){ parent.appendChild(el); } return el; };Calendar._add_evs=function(el){ with(Calendar){ addEvent(el,"mouseover",dayMouseOver);addEvent(el,"mousedown",dayMouseDown);addEvent(el,"mouseout",dayMouseOut);if(is_ie){ addEvent(el,"dblclick",dayMouseDblClick);el.setAttribute("unselectable",true); } } };Calendar.findMonth=function(el){ if(typeof el.month!="undefined"){ return el; }else if(typeof el.parentNode.month!="undefined"){ return el.parentNode; } return null; };Calendar.findYear=function(el){ if(typeof el.year!="undefined"){ return el; }else if(typeof el.parentNode.year!="undefined"){ return el.parentNode; } return null; };Calendar.showMonthsCombo=function(){ var cal=Calendar._C;if(!cal){ return false; } var cal=cal;var cd=cal.activeDiv;var mc=cal.monthsCombo;if(cal.hilitedMonth){ Calendar.removeClass(cal.hilitedMonth,"hilite"); } if(cal.activeMonth){ Calendar.removeClass(cal.activeMonth,"active"); } var mon=cal.monthsCombo.getElementsByTagName("div")[cal.date.getMonth()];Calendar.addClass(mon,"active");cal.activeMonth=mon;var s=mc.style;s.display="block";if(cd.navtype<0) s.left=cd.offsetLeft+"px";else{ var mcw=mc.offsetWidth;if(typeof mcw=="undefined") mcw=50;s.left=(cd.offsetLeft+cd.offsetWidth-mcw)+"px"; } s.top=(cd.offsetTop+cd.offsetHeight)+"px"; };Calendar.showYearsCombo=function(fwd){ var cal=Calendar._C;if(!cal){ return false; } var cal=cal;var cd=cal.activeDiv;var yc=cal.yearsCombo;if(cal.hilitedYear){ Calendar.removeClass(cal.hilitedYear,"hilite"); } if(cal.activeYear){ Calendar.removeClass(cal.activeYear,"active"); } cal.activeYear=null;var Y=cal.date.getFullYear()+(fwd?1:-1);var yr=yc.firstChild;var show=false;for(var i=12;i>0;--i){ if(Y>=cal.minYear&&Y<=cal.maxYear){ yr.innerHTML=Y;yr.year=Y;yr.style.display="block";show=true; }else{ yr.style.display="none"; } yr=yr.nextSibling;Y+=fwd?cal.yearStep:-cal.yearStep; } if(show){ var s=yc.style;s.display="block";if(cd.navtype<0) s.left=cd.offsetLeft+"px";else{ var ycw=yc.offsetWidth;if(typeof ycw=="undefined") ycw=50;s.left=(cd.offsetLeft+cd.offsetWidth-ycw)+"px"; } s.top=(cd.offsetTop+cd.offsetHeight)+"px"; } };Calendar.tableMouseUp=function(ev){ var cal=Calendar._C;if(!cal){ return false; } if(cal.timeout){ clearTimeout(cal.timeout); } var el=cal.activeDiv;if(!el){ return false; } var target=Calendar.getTargetElement(ev);ev||(ev=window.event);Calendar.removeClass(el,"active");if(target==el||target.parentNode==el){ Calendar.cellClick(el,ev); } var mon=Calendar.findMonth(target);var date=null;if(mon){ date=new Date(cal.date);if(mon.month!=date.getMonth()){ date.setMonth(mon.month);cal.setDate(date);cal.dateClicked=false;cal.callHandler(); } }else{ var year=Calendar.findYear(target);if(year){ date=new Date(cal.date);if(year.year!=date.getFullYear()){ date.setFullYear(year.year);cal.setDate(date);cal.dateClicked=false;cal.callHandler(); } } } with(Calendar){ removeEvent(document,"mouseup",tableMouseUp);removeEvent(document,"mouseover",tableMouseOver);removeEvent(document,"mousemove",tableMouseOver);cal._hideCombos();_C=null;return stopEvent(ev); } };Calendar.tableMouseOver=function(ev){ var cal=Calendar._C;if(!cal){ return; } var el=cal.activeDiv;var target=Calendar.getTargetElement(ev);if(target==el||target.parentNode==el){ Calendar.addClass(el,"hilite active");Calendar.addClass(el.parentNode,"rowhilite"); }else{ if(typeof el.navtype=="undefined"||(el.navtype!=50&&(el.navtype==0||Math.abs(el.navtype)>2))) Calendar.removeClass(el,"active");Calendar.removeClass(el,"hilite");Calendar.removeClass(el.parentNode,"rowhilite"); } ev||(ev=window.event);if(el.navtype==50&&target!=el){ var pos=Calendar.getAbsolutePos(el);var w=el.offsetWidth;var x=ev.clientX;var dx;var decrease=true;if(x>pos.x+w){ dx=x-pos.x-w;decrease=false; }else dx=pos.x-x;if(dx<0)dx=0;var range=el._range;var current=el._current;var count=Math.floor(dx/10)%range.length;for(var i=range.length;--i>=0;) if(range[i]==current) break;while(count-->0) if(decrease){ if(--i<0) i=range.length-1; }else if(++i>=range.length) i=0;var newval=range[i];el.innerHTML=newval;cal.onUpdateTime(); } var mon=Calendar.findMonth(target);if(mon){ if(mon.month!=cal.date.getMonth()){ if(cal.hilitedMonth){ Calendar.removeClass(cal.hilitedMonth,"hilite"); } Calendar.addClass(mon,"hilite");cal.hilitedMonth=mon; }else if(cal.hilitedMonth){ Calendar.removeClass(cal.hilitedMonth,"hilite"); } }else{ if(cal.hilitedMonth){ Calendar.removeClass(cal.hilitedMonth,"hilite"); } var year=Calendar.findYear(target);if(year){ if(year.year!=cal.date.getFullYear()){ if(cal.hilitedYear){ Calendar.removeClass(cal.hilitedYear,"hilite"); } Calendar.addClass(year,"hilite");cal.hilitedYear=year; }else if(cal.hilitedYear){ Calendar.removeClass(cal.hilitedYear,"hilite"); } }else if(cal.hilitedYear){ Calendar.removeClass(cal.hilitedYear,"hilite"); } } return Calendar.stopEvent(ev); };Calendar.tableMouseDown=function(ev){ if(Calendar.getTargetElement(ev)==Calendar.getElement(ev)){ return Calendar.stopEvent(ev); } };Calendar.calDragIt=function(ev){ var cal=Calendar._C;if(!(cal&&cal.dragging)){ return false; } var posX;var posY;if(Calendar.is_ie){ posY=window.event.clientY+document.body.scrollTop;posX=window.event.clientX+document.body.scrollLeft; }else{ posX=ev.pageX;posY=ev.pageY; } cal.hideShowCovered();var st=cal.element.style;st.left=(posX-cal.xOffs)+"px";st.top=(posY-cal.yOffs)+"px";return Calendar.stopEvent(ev); };Calendar.calDragEnd=function(ev){ var cal=Calendar._C;if(!cal){ return false; } cal.dragging=false;with(Calendar){ removeEvent(document,"mousemove",calDragIt);removeEvent(document,"mouseup",calDragEnd);tableMouseUp(ev); } cal.hideShowCovered(); };Calendar.dayMouseDown=function(ev){ var el=Calendar.getElement(ev);if(el.disabled){ return false; } var cal=el.calendar;cal.activeDiv=el;Calendar._C=cal;if(el.navtype!=300)with(Calendar){ if(el.navtype==50){ el._current=el.innerHTML;addEvent(document,"mousemove",tableMouseOver); }else addEvent(document,Calendar.is_ie5?"mousemove":"mouseover",tableMouseOver);addClass(el,"hilite active");addEvent(document,"mouseup",tableMouseUp); }else if(cal.isPopup){ cal._dragStart(ev); } if(el.navtype==-1||el.navtype==1){ if(cal.timeout)clearTimeout(cal.timeout);cal.timeout=setTimeout("Calendar.showMonthsCombo()",250); }else if(el.navtype==-2||el.navtype==2){ if(cal.timeout)clearTimeout(cal.timeout);cal.timeout=setTimeout((el.navtype>0)?"Calendar.showYearsCombo(true)":"Calendar.showYearsCombo(false)",250); }else{ cal.timeout=null; } return Calendar.stopEvent(ev); };Calendar.dayMouseDblClick=function(ev){ Calendar.cellClick(Calendar.getElement(ev),ev||window.event);if(Calendar.is_ie){ document.selection.empty(); } };Calendar.dayMouseOver=function(ev){ var el=Calendar.getElement(ev);if(Calendar.isRelated(el,ev)||Calendar._C||el.disabled){ return false; } if(el.ttip){ if(el.ttip.substr(0,1)=="_"){ el.ttip=el.caldate.print(el.calendar.ttDateFormat)+el.ttip.substr(1); } el.calendar.tooltips.innerHTML=el.ttip; } if(el.navtype!=300){ Calendar.addClass(el,"hilite");if(el.caldate){ Calendar.addClass(el.parentNode,"rowhilite"); } } return Calendar.stopEvent(ev); };Calendar.dayMouseOut=function(ev){ with(Calendar){ var el=getElement(ev);if(isRelated(el,ev)||_C||el.disabled) return false;removeClass(el,"hilite");if(el.caldate) removeClass(el.parentNode,"rowhilite");if(el.calendar) el.calendar.tooltips.innerHTML=_TT["SEL_DATE"];return stopEvent(ev); } };Calendar.cellClick=function(el,ev){ var cal=el.calendar;var closing=false;var newdate=false;var date=null;if(typeof el.navtype=="undefined"){ if(cal.currentDateEl){ Calendar.removeClass(cal.currentDateEl,"selected");Calendar.addClass(el,"selected");closing=(cal.currentDateEl==el);if(!closing){ cal.currentDateEl=el; } } cal.date.setDateOnly(el.caldate);date=cal.date;var other_month=!(cal.dateClicked=!el.otherMonth);if(!other_month&&!cal.currentDateEl) cal._toggleMultipleDate(new Date(date));else newdate=!el.disabled;if(other_month) cal._init(cal.firstDayOfWeek,date); }else{ if(el.navtype==200){ Calendar.removeClass(el,"hilite");cal.callCloseHandler();return; } date=new Date(cal.date);if(el.navtype==0) date.setDateOnly(new Date());cal.dateClicked=false;var year=date.getFullYear();var mon=date.getMonth();function setMonth(m){ var day=date.getDate();var max=date.getMonthDays(m);if(day>max){ date.setDate(max); } date.setMonth(m); };switch(el.navtype){ case 400:Calendar.removeClass(el,"hilite");var text=Calendar._TT["ABOUT"];if(typeof text!="undefined"){ text+=cal.showsTime?Calendar._TT["ABOUT_TIME"]:""; }else{ text="Help and about box text is not translated into this language.\n"+"If you know this language and you feel generous please update\n"+"the corresponding file in \"lang\" subdir to match calendar-en.js\n"+"and send it back to <mihai_bazon@yahoo.com> to get it into the distribution ;-)\n\n"+"Thank you!\n"+"http://dynarch.com/mishoo/calendar.epl\n"; } alert(text);return;case-2:if(year>cal.minYear){ date.setFullYear(year-1); } break;case-1:if(mon>0){ setMonth(mon-1); }else if(year-->cal.minYear){ date.setFullYear(year);setMonth(11); } break;case 1:if(mon<11){ setMonth(mon+1); }else if(year<cal.maxYear){ date.setFullYear(year+1);setMonth(0); } break;case 2:if(year<cal.maxYear){ date.setFullYear(year+1); } break;case 100:cal.setFirstDayOfWeek(el.fdow);return;case 50:var range=el._range;var current=el.innerHTML;for(var i=range.length;--i>=0;) if(range[i]==current) break;if(ev&&ev.shiftKey){ if(--i<0) i=range.length-1; }else if(++i>=range.length) i=0;var newval=range[i];el.innerHTML=newval;cal.onUpdateTime();return;case 0:if((typeof cal.getDateStatus=="function")&&cal.getDateStatus(date,date.getFullYear(),date.getMonth(),date.getDate())){ return false; } break; } if(!date.equalsTo(cal.date)){ cal.setDate(date);newdate=true; }else if(el.navtype==0) newdate=closing=true; } if(newdate){ ev&&cal.callHandler(); } if(closing){ Calendar.removeClass(el,"hilite");ev&&cal.callCloseHandler(); } };Calendar.prototype.create=function(_par){ var parent=null;if(!_par){ parent=document.getElementsByTagName("body")[0];this.isPopup=true; }else{ parent=_par;this.isPopup=false; } this.date=this.dateStr?new Date(this.dateStr):new Date();var table=Calendar.createElement("table");this.table=table;table.cellSpacing=0;table.cellPadding=0;table.calendar=this;Calendar.addEvent(table,"mousedown",Calendar.tableMouseDown);var div=Calendar.createElement("div");this.element=div;div.className="calendar";if(this.isPopup){ div.style.position="absolute";div.style.display="none"; } div.appendChild(table);var thead=Calendar.createElement("thead",table);var cell=null;var row=null;var cal=this;var hh=function(text,cs,navtype){ cell=Calendar.createElement("td",row);cell.colSpan=cs;cell.className="button";if(navtype!=0&&Math.abs(navtype)<=2) cell.className+=" nav";Calendar._add_evs(cell);cell.calendar=cal;cell.navtype=navtype;cell.innerHTML="<div unselectable='on'>"+text+"</div>";return cell; };row=Calendar.createElement("tr",thead);var title_length=6;(this.isPopup)&&--title_length;(this.weekNumbers)&&++title_length;hh("?",1,400).ttip=Calendar._TT["INFO"];this.title=hh("",title_length,300);this.title.className="title";if(this.isPopup){ this.title.ttip=Calendar._TT["DRAG_TO_MOVE"];this.title.style.cursor="move";hh("&#x00d7;",1,200).ttip=Calendar._TT["CLOSE"]; } row=Calendar.createElement("tr",thead);row.className="headrow";this._nav_py=hh("&#x00ab;",1,-2);this._nav_py.ttip=Calendar._TT["PREV_YEAR"];this._nav_pm=hh("&#x2039;",1,-1);this._nav_pm.ttip=Calendar._TT["PREV_MONTH"];this._nav_now=hh(Calendar._TT["TODAY"],this.weekNumbers?4:3,0);this._nav_now.ttip=Calendar._TT["GO_TODAY"];this._nav_nm=hh("&#x203a;",1,1);this._nav_nm.ttip=Calendar._TT["NEXT_MONTH"];this._nav_ny=hh("&#x00bb;",1,2);this._nav_ny.ttip=Calendar._TT["NEXT_YEAR"];row=Calendar.createElement("tr",thead);row.className="daynames";if(this.weekNumbers){ cell=Calendar.createElement("td",row);cell.className="name wn";cell.innerHTML=Calendar._TT["WK"]; } for(var i=7;i>0;--i){ cell=Calendar.createElement("td",row);if(!i){ cell.navtype=100;cell.calendar=this;Calendar._add_evs(cell); } } this.firstdayname=(this.weekNumbers)?row.firstChild.nextSibling:row.firstChild;this._displayWeekdays();var tbody=Calendar.createElement("tbody",table);this.tbody=tbody;for(i=6;i>0;--i){ row=Calendar.createElement("tr",tbody);if(this.weekNumbers){ cell=Calendar.createElement("td",row); } for(var j=7;j>0;--j){ cell=Calendar.createElement("td",row);cell.calendar=this;Calendar._add_evs(cell); } } if(this.showsTime){ row=Calendar.createElement("tr",tbody);row.className="time";cell=Calendar.createElement("td",row);cell.className="time";cell.colSpan=2;cell.innerHTML=Calendar._TT["TIME"]||"&nbsp;";cell=Calendar.createElement("td",row);cell.className="time";cell.colSpan=this.weekNumbers?4:3;(function(){ function makeTimePart(className,init,range_start,range_end){ var part=Calendar.createElement("span",cell);part.className=className;part.innerHTML=init;part.calendar=cal;part.ttip=Calendar._TT["TIME_PART"];part.navtype=50;part._range=[];if(typeof range_start!="number") part._range=range_start;else{ for(var i=range_start;i<=range_end;++i){ var txt;if(i<10&&range_end>=10)txt='0'+i;else txt=''+i;part._range[part._range.length]=txt; } } Calendar._add_evs(part);return part; };var hrs=cal.date.getHours();var mins=cal.date.getMinutes();var t12=!cal.time24;var pm=(hrs>12);if(t12&&pm)hrs-=12;var H=makeTimePart("hour",hrs,t12?1:0,t12?12:23);var span=Calendar.createElement("span",cell);span.innerHTML=":";span.className="colon";var M=makeTimePart("minute",mins,0,59);var AP=null;cell=Calendar.createElement("td",row);cell.className="time";cell.colSpan=2;if(t12) AP=makeTimePart("ampm",pm?"pm":"am",["am","pm"]);else cell.innerHTML="&nbsp;";cal.onSetTime=function(){ var pm,hrs=this.date.getHours(),mins=this.date.getMinutes();if(t12){ pm=(hrs>=12);if(pm)hrs-=12;if(hrs==0)hrs=12;AP.innerHTML=pm?"pm":"am"; } H.innerHTML=(hrs<10)?("0"+hrs):hrs;M.innerHTML=(mins<10)?("0"+mins):mins; };cal.onUpdateTime=function(){ var date=this.date;var h=parseInt(H.innerHTML,10);if(t12){ if(/pm/i.test(AP.innerHTML)&&h<12) h+=12;else if(/am/i.test(AP.innerHTML)&&h==12) h=0; } var d=date.getDate();var m=date.getMonth();var y=date.getFullYear();date.setHours(h);date.setMinutes(parseInt(M.innerHTML,10));date.setFullYear(y);date.setMonth(m);date.setDate(d);this.dateClicked=false;this.callHandler(); }; })(); }else{ this.onSetTime=this.onUpdateTime=function(){}; } var tfoot=Calendar.createElement("tfoot",table);row=Calendar.createElement("tr",tfoot);row.className="footrow";cell=hh(Calendar._TT["SEL_DATE"],this.weekNumbers?8:7,300);cell.className="ttip";if(this.isPopup){ cell.ttip=Calendar._TT["DRAG_TO_MOVE"];cell.style.cursor="move"; } this.tooltips=cell;div=Calendar.createElement("div",this.element);this.monthsCombo=div;div.className="combo";for(i=0;i<Calendar._MN.length;++i){ var mn=Calendar.createElement("div");mn.className=Calendar.is_ie?"label-IEfix":"label";mn.month=i;mn.innerHTML=Calendar._SMN[i];div.appendChild(mn); } div=Calendar.createElement("div",this.element);this.yearsCombo=div;div.className="combo";for(i=12;i>0;--i){ var yr=Calendar.createElement("div");yr.className=Calendar.is_ie?"label-IEfix":"label";div.appendChild(yr); } this._init(this.firstDayOfWeek,this.date);parent.appendChild(this.element); };Calendar.prototype._init=function(firstDayOfWeek,date){ var today=new Date(),TY=today.getFullYear(),TM=today.getMonth(),TD=today.getDate();this.table.style.visibility="hidden";var year=date.getFullYear();if(year<this.minYear){ year=this.minYear;date.setFullYear(year); }else if(year>this.maxYear){ year=this.maxYear;date.setFullYear(year); } this.firstDayOfWeek=firstDayOfWeek;this.date=new Date(date);var month=date.getMonth();var mday=date.getDate();var no_days=date.getMonthDays();date.setDate(1);var day1=(date.getDay()-this.firstDayOfWeek)%7;if(day1<0) day1+=7;date.setDate(-day1);date.setDate(date.getDate()+1);var row=this.tbody.firstChild;var MN=Calendar._SMN[month];var ar_days=this.ar_days=new Array();var weekend=Calendar._TT["WEEKEND"];var dates=this.multiple?(this.datesCells={}):null;for(var i=0;i<6;++i,row=row.nextSibling){ var cell=row.firstChild;if(this.weekNumbers){ cell.className="day wn";cell.innerHTML=date.getWeekNumber();cell=cell.nextSibling; } row.className="daysrow";var hasdays=false,iday,dpos=ar_days[i]=[];for(var j=0;j<7;++j,cell=cell.nextSibling,date.setDate(iday+1)){ iday=date.getDate();var wday=date.getDay();cell.className="day";cell.pos=i<<4|j;dpos[j]=cell;var current_month=(date.getMonth()==month);if(!current_month){ if(this.showsOtherMonths){ cell.className+=" othermonth";cell.otherMonth=true; }else{ cell.className="emptycell";cell.innerHTML="&nbsp;";cell.disabled=true;continue; } }else{ cell.otherMonth=false;hasdays=true; } cell.disabled=false;cell.innerHTML=this.getDateText?this.getDateText(date,iday):iday;if(dates) dates[date.print("%Y%m%d")]=cell;if(this.getDateStatus){ var status=this.getDateStatus(date,year,month,iday);if(this.getDateToolTip){ var toolTip=this.getDateToolTip(date,year,month,iday);if(toolTip) cell.title=toolTip; } if(status===true){ cell.className+=" disabled";cell.disabled=true; }else{ if(/disabled/i.test(status)) cell.disabled=true;cell.className+=" "+status; } } if(!cell.disabled){ cell.caldate=new Date(date);cell.ttip="_";if(!this.multiple&&current_month&&iday==mday&&this.hiliteToday){ cell.className+=" selected";this.currentDateEl=cell; } if(date.getFullYear()==TY&&date.getMonth()==TM&&iday==TD){ cell.className+=" today";cell.ttip+=Calendar._TT["PART_TODAY"]; } if(weekend.indexOf(wday.toString())!=-1) cell.className+=cell.otherMonth?" oweekend":" weekend"; } } if(!(hasdays||this.showsOtherMonths)) row.className="emptyrow"; } this.title.innerHTML=Calendar._MN[month]+", "+year;this.onSetTime();this.table.style.visibility="visible";this._initMultipleDates(); };Calendar.prototype._initMultipleDates=function(){ if(this.multiple){ for(var i in this.multiple){ var cell=this.datesCells[i];var d=this.multiple[i];if(!d) continue;if(cell) cell.className+=" selected"; } } };Calendar.prototype._toggleMultipleDate=function(date){ if(this.multiple){ var ds=date.print("%Y%m%d");var cell=this.datesCells[ds];if(cell){ var d=this.multiple[ds];if(!d){ Calendar.addClass(cell,"selected");this.multiple[ds]=date; }else{ Calendar.removeClass(cell,"selected");delete this.multiple[ds]; } } } };Calendar.prototype.setDateToolTipHandler=function(unaryFunction){ this.getDateToolTip=unaryFunction; };Calendar.prototype.setDate=function(date){ if(!date.equalsTo(this.date)){ this._init(this.firstDayOfWeek,date); } };Calendar.prototype.refresh=function(){ this._init(this.firstDayOfWeek,this.date); };Calendar.prototype.setFirstDayOfWeek=function(firstDayOfWeek){ this._init(firstDayOfWeek,this.date);this._displayWeekdays(); };Calendar.prototype.setDateStatusHandler=Calendar.prototype.setDisabledHandler=function(unaryFunction){ this.getDateStatus=unaryFunction; };Calendar.prototype.setRange=function(a,z){ this.minYear=a;this.maxYear=z; };Calendar.prototype.callHandler=function(){ if(this.onSelected){ this.onSelected(this,this.date.print(this.dateFormat)); } };Calendar.prototype.callCloseHandler=function(){ if(this.onClose){ this.onClose(this); } this.hideShowCovered(); };Calendar.prototype.destroy=function(){ var el=this.element.parentNode;el.removeChild(this.element);Calendar._C=null;window._dynarch_popupCalendar=null; };Calendar.prototype.reparent=function(new_parent){ var el=this.element;el.parentNode.removeChild(el);new_parent.appendChild(el); };Calendar._checkCalendar=function(ev){ var calendar=window._dynarch_popupCalendar;if(!calendar){ return false; } var el=Calendar.is_ie?Calendar.getElement(ev):Calendar.getTargetElement(ev);for(;el!=null&&el!=calendar.element;el=el.parentNode);if(el==null){ window._dynarch_popupCalendar.callCloseHandler();return Calendar.stopEvent(ev); } };Calendar.prototype.show=function(){ var rows=this.table.getElementsByTagName("tr");for(var i=rows.length;i>0;){ var row=rows[--i];Calendar.removeClass(row,"rowhilite");var cells=row.getElementsByTagName("td");for(var j=cells.length;j>0;){ var cell=cells[--j];Calendar.removeClass(cell,"hilite");Calendar.removeClass(cell,"active"); } } this.element.style.display="block";this.hidden=false;if(this.isPopup){ window._dynarch_popupCalendar=this;Calendar.addEvent(document,"mousedown",Calendar._checkCalendar); } this.hideShowCovered(); };Calendar.prototype.hide=function(){ if(this.isPopup){ Calendar.removeEvent(document,"mousedown",Calendar._checkCalendar); } this.element.style.display="none";this.hidden=true;this.hideShowCovered(); };Calendar.prototype.showAt=function(x,y){ var s=this.element.style;s.left=x+"px";s.top=y+"px";this.show(); };Calendar.prototype.showAtElement=function(el,opts){ var self=this;var p=Calendar.getAbsolutePos(el);if(!opts||typeof opts!="string"){ this.showAt(p.x,p.y+el.offsetHeight);return true; } function fixPosition(box){ if(box.x<0) box.x=0;if(box.y<0) box.y=0;var cp=document.createElement("div");var s=cp.style;s.position="absolute";s.right=s.bottom=s.width=s.height="0px";document.body.appendChild(cp);var br=Calendar.getAbsolutePos(cp);document.body.removeChild(cp);br.y+=window.scrollY;br.x+=window.scrollX;var tmp=box.x+box.width-br.x;if(tmp>0)box.x-=tmp;tmp=box.y+box.height-br.y;if(tmp>0)box.y-=tmp; };this.element.style.display="block";Calendar.continuation_for_khtml_browser=function(){ var w=self.element.offsetWidth;var h=self.element.offsetHeight;self.element.style.display="none";var valign=opts.substr(0,1);var halign="l";if(opts.length>1){ halign=opts.substr(1,1); } switch(valign){ case"T":p.y-=h;break;case"B":p.y+=el.offsetHeight;break;case"C":p.y+=(el.offsetHeight-h)/2;break;case"t":p.y+=el.offsetHeight-h;break;case"b":break; } switch(halign){ case"L":p.x-=w;break;case"R":p.x+=el.offsetWidth;break;case"C":p.x+=(el.offsetWidth-w)/2;break;case"l":p.x+=el.offsetWidth-w;break;case"r":break; } p.width=w;p.height=h+40;self.monthsCombo.style.display="none";fixPosition(p);self.showAt(p.x,p.y); };if(Calendar.is_khtml) setTimeout("Calendar.continuation_for_khtml_browser()",10);else Calendar.continuation_for_khtml_browser(); };Calendar.prototype.setDateFormat=function(str){ this.dateFormat=str; };Calendar.prototype.setTtDateFormat=function(str){ this.ttDateFormat=str; };Calendar.prototype.parseDate=function(str,fmt){ if(!fmt) fmt=this.dateFormat;this.setDate(Date.parseDate(str,fmt)); };Calendar.prototype.hideShowCovered=function(){ if(!Calendar.is_ie&&!Calendar.is_opera) return;function getVisib(obj){ var value=obj.style.visibility;if(!value){ if(document.defaultView&&typeof(document.defaultView.getComputedStyle)=="function"){ if(!Calendar.is_khtml) value=document.defaultView.getComputedStyle(obj,"").getPropertyValue("visibility");else value=''; }else if(obj.currentStyle){ value=obj.currentStyle.visibility; }else value=''; } return value; };var tags=new Array("applet","iframe","select");var el=this.element;var p=Calendar.getAbsolutePos(el);var EX1=p.x;var EX2=el.offsetWidth+EX1;var EY1=p.y;var EY2=el.offsetHeight+EY1;for(var k=tags.length;k>0;){ var ar=document.getElementsByTagName(tags[--k]);var cc=null;for(var i=ar.length;i>0;){ cc=ar[--i];p=Calendar.getAbsolutePos(cc);var CX1=p.x;var CX2=cc.offsetWidth+CX1;var CY1=p.y;var CY2=cc.offsetHeight+CY1;if(this.hidden||(CX1>EX2)||(CX2<EX1)||(CY1>EY2)||(CY2<EY1)){ if(!cc.__msh_save_visibility){ cc.__msh_save_visibility=getVisib(cc); } cc.style.visibility=cc.__msh_save_visibility; }else{ if(!cc.__msh_save_visibility){ cc.__msh_save_visibility=getVisib(cc); } cc.style.visibility="hidden"; } } } };Calendar.prototype._displayWeekdays=function(){ var fdow=this.firstDayOfWeek;var cell=this.firstdayname;var weekend=Calendar._TT["WEEKEND"];for(var i=0;i<7;++i){ cell.className="day name";var realday=(i+fdow)%7;if(i){ cell.ttip=Calendar._TT["DAY_FIRST"].replace("%s",Calendar._DN[realday]);cell.navtype=100;cell.calendar=this;cell.fdow=realday;Calendar._add_evs(cell); } if(weekend.indexOf(realday.toString())!=-1){ Calendar.addClass(cell,"weekend"); } cell.innerHTML=Calendar._SDN[(i+fdow)%7];cell=cell.nextSibling; } };Calendar.prototype._hideCombos=function(){ this.monthsCombo.style.display="none";this.yearsCombo.style.display="none"; };Calendar.prototype._dragStart=function(ev){ if(this.dragging){ return; } this.dragging=true;var posX;var posY;if(Calendar.is_ie){ posY=window.event.clientY+document.body.scrollTop;posX=window.event.clientX+document.body.scrollLeft; }else{ posY=ev.clientY+window.scrollY;posX=ev.clientX+window.scrollX; } var st=this.element.style;this.xOffs=posX-parseInt(st.left);this.yOffs=posY-parseInt(st.top);with(Calendar){ addEvent(document,"mousemove",calDragIt);addEvent(document,"mouseup",calDragEnd); } };Date._MD=new Array(31,28,31,30,31,30,31,31,30,31,30,31);Date.SECOND=1000;Date.MINUTE=60*Date.SECOND;Date.HOUR=60*Date.MINUTE;Date.DAY=24*Date.HOUR;Date.WEEK=7*Date.DAY;Date.parseDate=function(str,fmt){ var today=new Date();var y=0;var m=-1;var d=0;var a=str.split(/\W+/);var b=fmt.match(/%./g);var i=0,j=0;var hr=0;var min=0;for(i=0;i<a.length;++i){ if(!a[i]) continue;switch(b[i]){ case"%d":case"%e":d=parseInt(a[i],10);break;case"%m":m=parseInt(a[i],10)-1;break;case"%Y":case"%y":y=parseInt(a[i],10);(y<100)&&(y+=(y>29)?1900:2000);break;case"%b":case"%B":for(j=0;j<12;++j){ if(Calendar._MN[j].substr(0,a[i].length).toLowerCase()==a[i].toLowerCase()){ m=j;break; } } break;case"%H":case"%I":case"%k":case"%l":hr=parseInt(a[i],10);break;case"%P":case"%p":if(/pm/i.test(a[i])&&hr<12) hr+=12;else if(/am/i.test(a[i])&&hr>=12) hr-=12;break;case"%M":min=parseInt(a[i],10);break; } } if(isNaN(y))y=today.getFullYear();if(isNaN(m))m=today.getMonth();if(isNaN(d))d=today.getDate();if(isNaN(hr))hr=today.getHours();if(isNaN(min))min=today.getMinutes();if(y!=0&&m!=-1&&d!=0) return new Date(y,m,d,hr,min,0);y=0;m=-1;d=0;for(i=0;i<a.length;++i){ if(a[i].search(/[a-zA-Z]+/)!=-1){ var t=-1;for(j=0;j<12;++j){ if(Calendar._MN[j].substr(0,a[i].length).toLowerCase()==a[i].toLowerCase()){ t=j;break; } } if(t!=-1){ if(m!=-1){ d=m+1; } m=t; } }else if(parseInt(a[i],10)<=12&&m==-1){ m=a[i]-1; }else if(parseInt(a[i],10)>31&&y==0){ y=parseInt(a[i],10);(y<100)&&(y+=(y>29)?1900:2000); }else if(d==0){ d=a[i]; } } if(y==0) y=today.getFullYear();if(m!=-1&&d!=0) return new Date(y,m,d,hr,min,0);return today; };Date.prototype.getMonthDays=function(month){ var year=this.getFullYear();if(typeof month=="undefined"){ month=this.getMonth(); } if(((0==(year%4))&&((0!=(year%100))||(0==(year%400))))&&month==1){ return 29; }else{ return Date._MD[month]; } };Date.prototype.getDayOfYear=function(){ var now=new Date(this.getFullYear(),this.getMonth(),this.getDate(),0,0,0);var then=new Date(this.getFullYear(),0,0,0,0,0);var time=now-then;return Math.floor(time/Date.DAY); };Date.prototype.getWeekNumber=function(){ var d=new Date(this.getFullYear(),this.getMonth(),this.getDate(),0,0,0);var DoW=d.getDay();d.setDate(d.getDate()-(DoW+6)%7+3);var ms=d.valueOf();d.setMonth(0);d.setDate(4);return Math.round((ms-d.valueOf())/(7*864e5))+1; };Date.prototype.equalsTo=function(date){ return((this.getFullYear()==date.getFullYear())&&(this.getMonth()==date.getMonth())&&(this.getDate()==date.getDate())&&(this.getHours()==date.getHours())&&(this.getMinutes()==date.getMinutes())); };Date.prototype.setDateOnly=function(date){ var tmp=new Date(date);this.setDate(1);this.setFullYear(tmp.getFullYear());this.setMonth(tmp.getMonth());this.setDate(tmp.getDate()); };Date.prototype.print=function(str){ var m=this.getMonth();var d=this.getDate();var y=this.getFullYear();var wn=this.getWeekNumber();var w=this.getDay();var s={};var hr=this.getHours();var pm=(hr>=12);var ir=(pm)?(hr-12):hr;var dy=this.getDayOfYear();if(ir==0) ir=12;var min=this.getMinutes();var sec=this.getSeconds();s["%a"]=Calendar._SDN[w];s["%A"]=Calendar._DN[w];s["%b"]=Calendar._SMN[m];s["%B"]=Calendar._MN[m];s["%C"]=1+Math.floor(y/100);s["%d"]=(d<10)?("0"+d):d;s["%e"]=d;s["%H"]=(hr<10)?("0"+hr):hr;s["%I"]=(ir<10)?("0"+ir):ir;s["%j"]=(dy<100)?((dy<10)?("00"+dy):("0"+dy)):dy;s["%k"]=hr;s["%l"]=ir;s["%m"]=(m<9)?("0"+(1+m)):(1+m);s["%M"]=(min<10)?("0"+min):min;s["%n"]="\n";s["%p"]=pm?"PM":"AM";s["%P"]=pm?"pm":"am";s["%s"]=Math.floor(this.getTime()/1000);s["%S"]=(sec<10)?("0"+sec):sec;s["%t"]="\t";s["%U"]=s["%W"]=s["%V"]=(wn<10)?("0"+wn):wn;s["%u"]=w+1;s["%w"]=w;s["%y"]=(''+y).substr(2,2);s["%Y"]=y;s["%%"]="%";var re=/%./g;if(!Calendar.is_ie5&&!Calendar.is_khtml) return str.replace(re,function(par){ return s[par]||par; });var a=str.match(re);for(var i=0;i<a.length;i++){ var tmp=s[a[i]];if(tmp){ re=new RegExp(a[i],'g');str=str.replace(re,tmp); } } return str; };Date.prototype.__msh_oldSetFullYear=Date.prototype.setFullYear;Date.prototype.setFullYear=function(y){ var d=new Date(this);d.__msh_oldSetFullYear(y);if(d.getMonth()!=this.getMonth()) this.setDate(28);this.__msh_oldSetFullYear(y); };window._dynarch_popupCalendar=null;function selectDate(cal){ var p=cal.params;var update=(cal.dateClicked||p.electric);year=p.inputField.id;day=year+'-2';month=year+'-1';document.getElementById(month).value=cal.date.print('%m');document.getElementById(day).value=cal.date.print('%e');document.getElementById(year).value=cal.date.print('%Y'); } function selectEuroDate(cal){ var p=cal.params;var update=(cal.dateClicked||p.electric);year=p.inputField.id;day=year+'-1';month=year+'-2';document.getElementById(month).value=cal.date.print('%m');document.getElementById(day).value=cal.date.print('%e');document.getElementById(year).value=cal.date.print('%Y'); } Calendar._SDN=new Array("Zo","Ma","Di","Wo","Do","Vr","Za","Zo"); Calendar._FD=0; Calendar._SMN=new Array("Jan","Feb","Mar","Apr","Mei","Jun","Jul","Aug","Sep","Okt","Nov","Dec"); Calendar._DN = new Array ("Zondag", "Maandag", "Dinsdag", "Woensdag", "Donderdag", "Vrijdag", "Zaterdag", "Zondag"); Calendar._SDN_len = 2; Calendar._MN = new Array ("Januari", "Februari", "Maart", "April", "Mei", "Juni", "Juli", "Augustus", "September", "Oktober", "November", "December"); // tooltips Calendar._TT = {}; Calendar._TT["INFO"] = "Info"; Calendar._TT["ABOUT"] = "Datum selectie:\n" + "- Gebruik de \xab \xbb knoppen om een jaar te selecteren\n" + "- Gebruik de " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " knoppen om een maand te selecteren\n" + "- Houd de muis ingedrukt op de genoemde knoppen voor een snellere selectie."; Calendar._TT["ABOUT_TIME"] = "\n\n" + "Tijd selectie:\n" + "- Klik op een willekeurig onderdeel van het tijd gedeelte om het te verhogen\n" + "- of Shift-klik om het te verlagen\n" + "- of klik en sleep voor een snellere selectie."; //Calendar._TT["TOGGLE"] = "Selecteer de eerste week-dag"; Calendar._TT["PREV_YEAR"] = "Vorige (ingedrukt voor menu)"; Calendar._TT["PREV_MONTH"] = "Vorige (ingedrukt voor menu)"; Calendar._TT["GO_TODAY"] = "Ga naar Vandaag"; Calendar._TT["NEXT_MONTH"] = "Volgende (ingedrukt voor menu)"; Calendar._TT["NEXT_YEAR"] = "Volgende (ingedrukt voor menu)"; Calendar._TT["SEL_DATE"] = "Selecteer datum"; Calendar._TT["DRAG_TO_MOVE"] = "Verplaatsen"; Calendar._TT["PART_TODAY"] = " (vandaag)"; //Calendar._TT["MON_FIRST"] = "Toon Maandag eerst"; //Calendar._TT["SUN_FIRST"] = "Toon Zondag eerst"; Calendar._TT["DAY_FIRST"] = "Toon %s eerst"; Calendar._TT["WEEKEND"] = "0,6"; Calendar._TT["CLOSE"] = "Sluiten"; Calendar._TT["TODAY"] = "(vandaag)"; Calendar._TT["TIME_PART"] = "(Shift-)Klik of sleep om de waarde te veranderen"; // date formats Calendar._TT["DEF_DATE_FORMAT"] = "%d-%m-%Y"; Calendar._TT["TT_DATE_FORMAT"] = "%a, %e %b %Y"; Calendar._TT["WK"] = "wk"; Calendar._TT["TIME"] = "Tijd:"; Calendar.setup=function(params){ function param_default(pname,def){ if(typeof params[pname]=="undefined"){ params[pname]=def; } };param_default("inputField",null);param_default("displayArea",null);param_default("button",null);param_default("eventName","click");param_default("ifFormat","%Y/%m/%d");param_default("daFormat","%Y/%m/%d");param_default("singleClick",true);param_default("disableFunc",null);param_default("dateStatusFunc",params["disableFunc"]);param_default("dateText",null);param_default("firstDay",null);param_default("align","BR");param_default("range",[1900,2999]);param_default("weekNumbers",false);param_default("flat",null);param_default("flatCallback",null);param_default("onSelect",null);param_default("onClose",null);param_default("onUpdate",null);param_default("date",null);param_default("showsTime",false);param_default("timeFormat","24");param_default("electric",true);param_default("step",2);param_default("position",null);param_default("cache",false);param_default("showOthers",false);param_default("multiple",null);var tmp=["inputField","displayArea","button"];for(var i in tmp){ if(typeof params[tmp[i]]=="string"){ params[tmp[i]]=document.getElementById(params[tmp[i]]); } } if(!(params.flat||params.multiple||params.inputField||params.displayArea||params.button)){ alert("Calendar.setup:\n Nothing to setup (no fields found). Please check your code");return false; } function onSelect(cal){ var p=cal.params;var update=(cal.dateClicked||p.electric);if(update&&p.inputField){ p.inputField.value=cal.date.print(p.ifFormat);if(typeof p.inputField.onchange=="function") p.inputField.onchange(); } if(update&&p.displayArea) p.displayArea.innerHTML=cal.date.print(p.daFormat);if(update&&typeof p.onUpdate=="function") p.onUpdate(cal);if(update&&p.flat){ if(typeof p.flatCallback=="function") p.flatCallback(cal); } if(update&&p.singleClick&&cal.dateClicked) cal.callCloseHandler(); };if(params.flat!=null){ if(typeof params.flat=="string") params.flat=document.getElementById(params.flat);if(!params.flat){ alert("Calendar.setup:\n Flat specified but can't find parent.");return false; } var cal=new Calendar(params.firstDay,params.date,params.onSelect||onSelect);cal.showsOtherMonths=params.showOthers;cal.showsTime=params.showsTime;cal.time24=(params.timeFormat=="24");cal.params=params;cal.weekNumbers=params.weekNumbers;cal.setRange(params.range[0],params.range[1]);cal.setDateStatusHandler(params.dateStatusFunc);cal.getDateText=params.dateText;if(params.ifFormat){ cal.setDateFormat(params.ifFormat); } if(params.inputField&&typeof params.inputField.value=="string"){ cal.parseDate(params.inputField.value); } cal.create(params.flat);cal.show();return false; } var triggerEl=params.button||params.displayArea||params.inputField;triggerEl["on"+params.eventName]=function(){ var dateEl=params.inputField||params.displayArea;var dateFmt=params.inputField?params.ifFormat:params.daFormat;var mustCreate=false;var cal=window.calendar;if(dateEl) params.date=Date.parseDate(dateEl.value||dateEl.innerHTML,dateFmt);if(!(cal&&params.cache)){ window.calendar=cal=new Calendar(params.firstDay,params.date,params.onSelect||onSelect,params.onClose||function(cal){ cal.hide(); });cal.showsTime=params.showsTime;cal.time24=(params.timeFormat=="24");cal.weekNumbers=params.weekNumbers;mustCreate=true; }else{ if(params.date) cal.setDate(params.date);cal.hide(); } if(params.multiple){ cal.multiple={};for(var i=params.multiple.length;--i>=0;){ var d=params.multiple[i];var ds=d.print("%Y%m%d");cal.multiple[ds]=d; } } cal.showsOtherMonths=params.showOthers;cal.yearStep=params.step;cal.setRange(params.range[0],params.range[1]);cal.params=params;cal.setDateStatusHandler(params.dateStatusFunc);cal.getDateText=params.dateText;cal.setDateFormat(dateFmt);if(mustCreate) cal.create();cal.refresh();if(!params.position) cal.showAtElement(params.button||params.displayArea||params.inputField,params.align);else cal.showAt(params.position[0],params.position[1]);return false; };return cal; };
JavaScript
/** * -------------------------------------------------------------------- * jQuery-Plugin "pngFix" * Version: 1.1, 11.09.2007 * by Andreas Eberhard, andreas.eberhard@gmail.com * http://jquery.andreaseberhard.de/ * * Copyright (c) 2007 Andreas Eberhard * Licensed under GPL (http://www.opensource.org/licenses/gpl-license.php) * * Changelog: * 11.09.2007 Version 1.1 * - removed noConflict * - added png-support for input type=image * - 01.08.2007 CSS background-image support extension added by Scott Jehl, scott@filamentgroup.com, http://www.filamentgroup.com * 31.05.2007 initial Version 1.0 * -------------------------------------------------------------------- * @example $(function(){$(document).pngFix();}); * @desc Fixes all PNG's in the document on document.ready * * jQuery(function(){jQuery(document).pngFix();}); * @desc Fixes all PNG's in the document on document.ready when using noConflict * * @example $(function(){$('div.examples').pngFix();}); * @desc Fixes all PNG's within div with class examples * * @example $(function(){$('div.examples').pngFix( { blankgif:'ext.gif' } );}); * @desc Fixes all PNG's within div with class examples, provides blank gif for input with png * -------------------------------------------------------------------- */ (function($) { jQuery.fn.pngFix = function(settings) { // Settings settings = jQuery.extend({ blankgif: 'blank.gif' }, settings); var ie55 = (navigator.appName == "Microsoft Internet Explorer" && parseInt(navigator.appVersion) == 4 && navigator.appVersion.indexOf("MSIE 5.5") != -1); var ie6 = (navigator.appName == "Microsoft Internet Explorer" && parseInt(navigator.appVersion) == 4 && navigator.appVersion.indexOf("MSIE 6.0") != -1); if (jQuery.browser.msie && (ie55 || ie6)) { //fix images with png-source jQuery(this).find("img[@src$=.png]").each(function() { jQuery(this).attr('width',jQuery(this).width()); jQuery(this).attr('height',jQuery(this).height()); var prevStyle = ''; var strNewHTML = ''; var imgId = (jQuery(this).attr('id')) ? 'id="' + jQuery(this).attr('id') + '" ' : ''; var imgClass = (jQuery(this).attr('class')) ? 'class="' + jQuery(this).attr('class') + '" ' : ''; var imgTitle = (jQuery(this).attr('title')) ? 'title="' + jQuery(this).attr('title') + '" ' : ''; var imgAlt = (jQuery(this).attr('alt')) ? 'alt="' + jQuery(this).attr('alt') + '" ' : ''; var imgAlign = (jQuery(this).attr('align')) ? 'float:' + jQuery(this).attr('align') + ';' : ''; var imgHand = (jQuery(this).parent().attr('href')) ? 'cursor:hand;' : ''; if (this.style.border) { prevStyle += 'border:'+this.style.border+';'; this.style.border = ''; } if (this.style.padding) { prevStyle += 'padding:'+this.style.padding+';'; this.style.padding = ''; } if (this.style.margin) { prevStyle += 'margin:'+this.style.margin+';'; this.style.margin = ''; } var imgStyle = (this.style.cssText); strNewHTML += '<span '+imgId+imgClass+imgTitle+imgAlt; strNewHTML += 'style="position:relative;white-space:pre-line;display:inline-block;background:transparent;'+imgAlign+imgHand; strNewHTML += 'width:' + jQuery(this).width() + 'px;' + 'height:' + jQuery(this).height() + 'px;'; strNewHTML += 'filter:progid:DXImageTransform.Microsoft.AlphaImageLoader' + '(src=\'' + jQuery(this).attr('src') + '\', sizingMethod=\'scale\');'; strNewHTML += imgStyle+'"></span>'; if (prevStyle != ''){ strNewHTML = '<span style="position:relative;display:inline-block;'+prevStyle+imgHand+'width:' + jQuery(this).width() + 'px;' + 'height:' + jQuery(this).height() + 'px;'+'">' + strNewHTML + '</span>'; } jQuery(this).hide(); jQuery(this).after(strNewHTML); }); // fix css background pngs jQuery(this).find("*").each(function(){ var bgIMG = jQuery(this).css('background-image'); if(bgIMG.indexOf(".png")!=-1){ var iebg = bgIMG.split('url("')[1].split('")')[0]; jQuery(this).css('background-image', 'none'); jQuery(this).get(0).runtimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + iebg + "',sizingMethod='scale')"; } }); //fix input with png-source jQuery(this).find("input[@src$=.png]").each(function() { var bgIMG = jQuery(this).attr('src'); jQuery(this).get(0).runtimeStyle.filter = 'progid:DXImageTransform.Microsoft.AlphaImageLoader' + '(src=\'' + bgIMG + '\', sizingMethod=\'scale\');'; jQuery(this).attr('src', settings.blankgif) }); } return jQuery; }; })(jQuery);
JavaScript
// SpryValidationPassword.js - version 0.3 - Spry Pre-Release 1.6.1 // // Copyright (c) 2006. Adobe Systems Incorporated. // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are met: // // * Redistributions of source code must retain the above copyright notice, // this list of conditions and the following disclaimer. // * Redistributions in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation // and/or other materials provided with the distribution. // * Neither the name of Adobe Systems Incorporated nor the names of its // contributors may be used to endorse or promote products derived from this // software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE // ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE // LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR // CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN // CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. var Spry; if (!Spry) Spry = {}; if (!Spry.Widget) Spry.Widget = {}; Spry.Widget.BrowserSniff = function() { var b = navigator.appName.toString(); var up = navigator.platform.toString(); var ua = navigator.userAgent.toString(); this.mozilla = this.ie = this.opera = this.safari = false; var re_opera = /Opera.([0-9\.]*)/i; var re_msie = /MSIE.([0-9\.]*)/i; var re_gecko = /gecko/i; var re_safari = /(applewebkit|safari)\/([\d\.]*)/i; var r = false; if ( (r = ua.match(re_opera))) { this.opera = true; this.version = parseFloat(r[1]); } else if ( (r = ua.match(re_msie))) { this.ie = true; this.version = parseFloat(r[1]); } else if ( (r = ua.match(re_safari))) { this.safari = true; this.version = parseFloat(r[2]); } else if (ua.match(re_gecko)) { var re_gecko_version = /rv:\s*([0-9\.]+)/i; r = ua.match(re_gecko_version); this.mozilla = true; this.version = parseFloat(r[1]); } this.windows = this.mac = this.linux = false; this.Platform = ua.match(/windows/i) ? "windows" : (ua.match(/linux/i) ? "linux" : (ua.match(/mac/i) ? "mac" : ua.match(/unix/i)? "unix" : "unknown")); this[this.Platform] = true; this.v = this.version; if (this.safari && this.mac && this.mozilla) { this.mozilla = false; } }; Spry.is = new Spry.Widget.BrowserSniff(); Spry.Widget.ValidationPassword = function(element, options) { options = Spry.Widget.Utils.firstValid(options, {}); if (!this.isBrowserSupported()) return; if (this.init(element, options) === false) return false; var validateOn = ['submit'].concat(Spry.Widget.Utils.firstValid(this.options.validateOn, [])); validateOn = validateOn.join(","); this.validateOn = 0; this.validateOn = this.validateOn | (validateOn.indexOf('submit') != -1 ? Spry.Widget.ValidationPassword.ONSUBMIT : 0); this.validateOn = this.validateOn | (validateOn.indexOf('blur') != -1 ? Spry.Widget.ValidationPassword.ONBLUR : 0); this.validateOn = this.validateOn | (validateOn.indexOf('change') != -1 ? Spry.Widget.ValidationPassword.ONCHANGE : 0); if (Spry.Widget.ValidationPassword.onloadDidFire) this.attachBehaviors(); else Spry.Widget.ValidationPassword.loadQueue.push(this); }; Spry.Widget.ValidationPassword.ONCHANGE = 1; Spry.Widget.ValidationPassword.ONBLUR = 2; Spry.Widget.ValidationPassword.ONSUBMIT = 4; Spry.Widget.ValidationPassword.prototype.init = function(element, options) { options = Spry.Widget.Utils.firstValid(options, []); this.options = []; this.element = this.getElement(element); if (!this.element) { return false; } else { if (this.element.nodeName.toUpperCase() == 'INPUT' && typeof this.element.type != 'undefined' && this.element.type.toUpperCase() == 'PASSWORD') { this.input = this.element; } else { var inputs = Spry.Widget.Utils.getValidChildrenWithNodeNameAtAnyLevel(this.element, 'INPUT', 'PASSWORD'); if (inputs && inputs.length > 0) this.input = inputs[0]; else this.input = false; } } if (!this.input) return false; this.event_handlers = []; this.validClass = "passwordValidState"; this.focusClass = "passwordFocusState"; this.requiredClass = "passwordRequiredState"; this.invalidStrengthClass = "passwordInvalidStrengthState"; this.invalidCharsMinClass = "passwordMinCharsState"; this.invalidCharsMaxClass = "passwordMaxCharsState"; this.invalidCustomClass = "passwordCustomState"; options.isRequired = Spry.Widget.Utils.firstValid(options.isRequired, true); options.additionalError = Spry.Widget.Utils.firstValid(options.additionalError, false); if (options.additionalError) options.additionalError = this.getElement(options.additionalError); var getRealValue = Spry.Widget.Utils.getOptionRealValue; options.minChars = getRealValue(options.minChars, false); options.maxChars = getRealValue(options.maxChars, false); // copy the default textfield behavior if (options.maxChars) this.input.removeAttribute("maxLength"); options.minAlphaChars = getRealValue(options.minAlphaChars, false); options.maxAlphaChars = getRealValue(options.maxAlphaChars, false); options.minUpperAlphaChars = getRealValue(options.minUpperAlphaChars, false); options.maxUpperAlphaChars = getRealValue(options.maxUpperAlphaChars, false); options.minSpecialChars = getRealValue(options.minSpecialChars, false); options.maxSpecialChars = getRealValue(options.maxSpecialChars, false); options.minNumbers = getRealValue(options.minNumbers, false); options.maxNumbers = getRealValue(options.maxNumbers, false); if ((options.minAlphaChars !== false && options.maxAlphaChars !== false && options.minAlphaChars > options.maxAlphaChars) || (options.minUpperAlphaChars !== false && options.maxUpperAlphaChars !== false && options.minUpperAlphaChars > options.maxUpperAlphaChars) || (options.minSpecialChars !== false && options.maxSpecialChars !== false && options.minSpecialChars > options.maxSpecialChars) || (options.minNumbers !== false && options.maxNumbers !== false && options.minNumbers > options.maxNumbers) || (options.maxUpperAlphaChars !== false && options.maxAlphaChars !== false && options.maxUpperAlphaChars > options.maxAlphaChars) || (options.maxChars !== false && options.minAlphaChars + options.minUpperAlphaChars + options.minSpecialChars + options.minNumbers > options.maxChars) ) { this.showError('Invalid Strength Options!'); return false; } Spry.Widget.Utils.setOptions(this, options); Spry.Widget.Utils.setOptions(this.options, options); }; Spry.Widget.ValidationPassword.loadQueue = []; Spry.Widget.ValidationPassword.onloadDidFire = false; Spry.Widget.ValidationPassword.prototype.getElement = function(ele) { if (ele && typeof ele == "string") ele=document.getElementById(ele); return ele; }; Spry.Widget.ValidationPassword.processLoadQueue = function(handler) { Spry.Widget.ValidationPassword.onloadDidFire = true; var q = Spry.Widget.ValidationPassword.loadQueue; var qlen = q.length; for (var i = 0; i < qlen; i++) q[i].attachBehaviors(); }; Spry.Widget.ValidationPassword.addLoadListener = function(handler) { if (typeof window.addEventListener != 'undefined') window.addEventListener('load', handler, false); else if (typeof document.addEventListener != 'undefined') document.addEventListener('load', handler, false); else if (typeof window.attachEvent != 'undefined') window.attachEvent('onload', handler); }; Spry.Widget.ValidationPassword.addLoadListener(Spry.Widget.ValidationPassword.processLoadQueue); Spry.Widget.ValidationPassword.prototype.destroy = function() { if (this.event_handlers) for (var i=0; i<this.event_handlers.length; i++) Spry.Widget.Utils.removeEventListener(this.event_handlers[i][0], this.event_handlers[i][1], this.event_handlers[i][2], false); try { delete this.element;} catch(err) {}; try { delete this.input;} catch(err) {}; try { delete this.event_handlers;} catch(err) {}; try { delete this.options;}catch(err) {}; var q = Spry.Widget.Form.onSubmitWidgetQueue; var qlen = q.length; for (var i = 0; i < qlen; i++) if (q[i] == this) { q.splice(i, 1); break; } }; Spry.Widget.ValidationPassword.prototype.attachBehaviors = function() { if (this.event_handlers && this.event_handlers.length > 0) return; var handlers = this.event_handlers; if (this.input) { var self = this; this.input.setAttribute("AutoComplete", "off"); if (this.validateOn & Spry.Widget.ValidationPassword.ONCHANGE) { var changeEvent = Spry.is.mozilla || Spry.is.opera || Spry.is.safari?"input": Spry.is.ie?"propertychange": "change"; handlers.push([this.input, changeEvent, function(e){if (self.isDisabled()) return true; return self.validate(e||event);}]); if (Spry.is.mozilla || Spry.is.safari) handlers.push([this.input, "dragdrop", function(e){if (self.isDisabled()) return true; return self.validate(e);}]); else if (Spry.is.ie) handlers.push([this.input, "drop", function(e){if (self.isDisabled()) return true; return self.validate(event);}]); } handlers.push([this.input, "blur", function(e) {if (self.isDisabled()) return true; return self.onBlur(e||event);}]); handlers.push([this.input, "focus", function(e) { if (self.isDisabled()) return true; return self.onFocus(e || event); }]); for (var i=0; i<this.event_handlers.length; i++) Spry.Widget.Utils.addEventListener(this.event_handlers[i][0], this.event_handlers[i][1], this.event_handlers[i][2], false); // submit this.form = Spry.Widget.Utils.getFirstParentWithNodeName(this.input, "FORM"); if (this.form) { // if no "onSubmit" handler has been attached to the current form, attach one if (!this.form.attachedSubmitHandler && !this.form.onsubmit) { this.form.onsubmit = function(e) { e = e || event; return Spry.Widget.Form.onSubmit(e, e.srcElement || e.currentTarget) }; this.form.attachedSubmitHandler = true; } if (!this.form.attachedResetHandler) { Spry.Widget.Utils.addEventListener(this.form, "reset", function(e) {var e = e || event; return Spry.Widget.Form.onReset(e, e.srcElement || e.currentTarget) }, false); this.form.attachedResetHandler = true; } // add the currrent widget to the "onSubmit" check queue; Spry.Widget.Form.onSubmitWidgetQueue.push(this); } } }; Spry.Widget.ValidationPassword.prototype.reset = function() { this.switchClassName(this.element, ''); this.switchClassName(this.additionalError, ''); this.removeClassName(this.element, this.focusClass); this.removeClassName(this.additionalError, this.focusClass); if (Spry.is.ie) { this.input.forceFireFirstOnPropertyChange = true; this.input.removeAttribute("forceFireFirstOnPropertyChange"); } }; Spry.Widget.ValidationPassword.prototype.validateLength = function(e) { var opt = this.options; if (this.isRequired && this.input.value == '') return this.requiredClass; if (opt.minChars > 0 && this.input.value.length < opt.minChars) return this.invalidCharsMinClass; if (opt.maxChars !== false && this.input.value.length > opt.maxChars) return this.invalidCharsMaxClass; return true; }; Spry.Widget.ValidationPassword.prototype.validateStrength = function(e) { var opt = this.options; var value = this.input.value; if (opt.minAlphaChars !== false || opt.maxAlphaChars !== false) { var alphaChars = value.replace(/[^a-z]/ig, '').length; if ((opt.maxAlphaChars !== false && alphaChars > opt.maxAlphaChars) || (opt.minAlphaChars !== false && alphaChars < opt.minAlphaChars)) return false; } if (opt.minUpperAlphaChars !== false || opt.maxUpperAlphaChars !== false) { var upperAlphaChars = value.replace(/[^A-Z]/g, '').length; if ((opt.maxUpperAlphaChars !== false && upperAlphaChars > opt.maxUpperAlphaChars) || (opt.minUpperAlphaChars !== false && upperAlphaChars < opt.minUpperAlphaChars)) return false; } if (opt.minNumbers !== false || opt.maxNumbers !== false) { var numbers = value.replace(/[^0-9]/g, '').length; if ((opt.maxNumbers !== false && numbers > opt.maxNumbers) || (opt.minNumbers !== false && numbers < opt.minNumbers)) return false; } if (opt.minSpecialChars !== false || opt.maxSpecialChars !== false) { var specials = value.replace(/[a-z0-9]/ig, '').length; if ((opt.maxSpecialChars !== false && specials > opt.maxSpecialChars) || (opt.minSpecialChars !== false && specials < opt.minSpecialChars)) return false; } return true; }; Spry.Widget.ValidationPassword.prototype.validate = function(e) { var vLength = this.validateLength(e); if (vLength !== true) { this.switchClassName(this.element, vLength); this.switchClassName(this.additionalError, vLength); return false; } var vStrength = this.validateStrength(e); if (vStrength !== true) { this.switchClassName(this.element, this.invalidStrengthClass); this.switchClassName(this.additionalError, this.invalidStrengthClass); return false; } if (typeof this.options.validation == 'function') { var customValidation = this.options.validation(this.input.value, this.options); if (customValidation !== true) { this.switchClassName(this.element, this.invalidCustomClass); return false; } } this.switchClassName(this.element, this.validClass); this.switchClassName(this.additionalError, this.validClass); return true; }; Spry.Widget.ValidationPassword.prototype.onBlur = function(e) { this.removeClassName(this.element, this.focusClass); this.removeClassName(this.additionalError, this.focusClass); if (this.validateOn & Spry.Widget.ValidationPassword.ONBLUR) this.validate(e); }; Spry.Widget.ValidationPassword.prototype.onFocus = function() { this.addClassName(this.element, this.focusClass); this.addClassName(this.additionalError, this.focusClass); }; Spry.Widget.ValidationPassword.prototype.switchClassName = function(ele, className) { var classes = [this.validClass, this.requiredClass, this.invalidCharsMaxClass, this.invalidCharsMinClass, this.invalidStrengthClass, this.invalidCustomClass]; for (var i =0; i< classes.length; i++) this.removeClassName(ele, classes[i]); this.addClassName(ele, className); }; Spry.Widget.ValidationPassword.prototype.addClassName = function(ele, className) { if (!ele || !className || (ele.className && ele.className.indexOf(className) != -1 && ele.className.search(new RegExp("\\b" + className + "\\b")) != -1)) return; ele.className += (ele.className ? " " : "") + className; }; Spry.Widget.ValidationPassword.prototype.removeClassName = function(ele, className) { if (!ele || !className || (ele.className && ele.className.indexOf(className) != -1 && ele.className.search(new RegExp("\\b" + className + "\\b")) == -1)) return; ele.className = ele.className.replace(new RegExp("\\s*\\b" + className + "\\b", "g"), ""); }; Spry.Widget.ValidationPassword.prototype.isBrowserSupported = function() { return Spry.is.ie && Spry.is.v >= 5 && Spry.is.windows || Spry.is.mozilla && Spry.is.v >= 1.4 || Spry.is.safari || Spry.is.opera && Spry.is.v >= 9; }; Spry.Widget.ValidationPassword.prototype.isDisabled = function() { return this.input && (this.input.disabled || this.input.readOnly) || !this.input; }; Spry.Widget.ValidationPassword.prototype.showError = function(msg) { alert('Spry.ValidationPassword ERR: ' + msg); }; ////////////////////////////////////////////////////////////////////// // // Spry.Widget.Form - common for all widgets // ////////////////////////////////////////////////////////////////////// if (!Spry.Widget.Form) Spry.Widget.Form = {}; if (!Spry.Widget.Form.onSubmitWidgetQueue) Spry.Widget.Form.onSubmitWidgetQueue = []; if (!Spry.Widget.Form.validate) { Spry.Widget.Form.validate = function(vform) { var isValid = true; var isElementValid = true; var q = Spry.Widget.Form.onSubmitWidgetQueue; var qlen = q.length; for (var i = 0; i < qlen; i++) if (!q[i].isDisabled() && q[i].form == vform) { isElementValid = q[i].validate(); isValid = isElementValid && isValid; } return isValid; }; }; if (!Spry.Widget.Form.onSubmit) { Spry.Widget.Form.onSubmit = function(e, form) { if (Spry.Widget.Form.validate(form) == false) return false; return true; }; }; if (!Spry.Widget.Form.onReset) { Spry.Widget.Form.onReset = function(e, vform) { var q = Spry.Widget.Form.onSubmitWidgetQueue; var qlen = q.length; for (var i = 0; i < qlen; i++) if (!q[i].isDisabled() && q[i].form == vform && typeof(q[i].reset) == 'function') q[i].reset(); return true; }; }; if (!Spry.Widget.Form.destroy) { Spry.Widget.Form.destroy = function(form) { var q = Spry.Widget.Form.onSubmitWidgetQueue; for (var i = 0; i < Spry.Widget.Form.onSubmitWidgetQueue.length; i++) if (q[i].form == form && typeof(q[i].destroy) == 'function') { q[i].destroy(); i--; } } }; if (!Spry.Widget.Form.destroyAll) { Spry.Widget.Form.destroyAll = function() { var q = Spry.Widget.Form.onSubmitWidgetQueue; for (var i = 0; i < Spry.Widget.Form.onSubmitWidgetQueue.length; i++) if (typeof(q[i].destroy) == 'function') { q[i].destroy(); i--; } } }; ////////////////////////////////////////////////////////////////////// // // Spry.Widget.Utils // ////////////////////////////////////////////////////////////////////// if (!Spry.Widget.Utils) Spry.Widget.Utils = {}; Spry.Widget.Utils.setOptions = function(obj, optionsObj, ignoreUndefinedProps) { if (!optionsObj) return; for (var optionName in optionsObj) { if (ignoreUndefinedProps && optionsObj[optionName] == undefined) continue; obj[optionName] = optionsObj[optionName]; } }; Spry.Widget.Utils.firstValid = function() { var ret = null; for(var i=0; i<Spry.Widget.Utils.firstValid.arguments.length; i++) if (typeof Spry.Widget.Utils.firstValid.arguments[i] != 'undefined') { ret = Spry.Widget.Utils.firstValid.arguments[i]; break; } return ret; }; Spry.Widget.Utils.getOptionRealValue = function(option, alternate) { var value = Spry.Widget.Utils.firstValid(option, alternate); if (value !== false) value = parseInt(value, 10); if (isNaN(value) || value < 0) value = false; return value; }; Spry.Widget.Utils.getValidChildrenWithNodeNameAtAnyLevel = function(node, nodeName, type) { var elements = node.getElementsByTagName(nodeName); var to_return = []; var j=0; if (elements) { for (var i=0; i < elements.length; i++) if (typeof elements[i].type != 'undefined' && elements[i].type.toUpperCase() == type.toUpperCase()) { to_return[j] = elements[i]; j++; } } return to_return; }; Spry.Widget.Utils.getFirstParentWithNodeName = function(node, nodeName) { while (node.parentNode && node.parentNode.nodeName.toLowerCase() != nodeName.toLowerCase() && node.parentNode.nodeName != 'BODY') node = node.parentNode; if (node.parentNode && node.parentNode.nodeName.toLowerCase() == nodeName.toLowerCase()) return node.parentNode; else return null; }; Spry.Widget.Utils.addEventListener = function(element, eventType, handler, capture) { try { if (element.addEventListener) element.addEventListener(eventType, handler, capture); else if (element.attachEvent) element.attachEvent("on" + eventType, handler, capture); } catch (e) {} }; Spry.Widget.Utils.removeEventListener = function(element, eventType, handler, capture) { try { if (element.removeEventListener) element.removeEventListener(eventType, handler, capture); else if (element.detachEvent) element.detachEvent("on" + eventType, handler, capture); } catch (e) {} };
JavaScript
// SpryValidationTextField.js - version 0.37 - Spry Pre-Release 1.6.1 // // Copyright (c) 2006. Adobe Systems Incorporated. // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are met: // // * Redistributions of source code must retain the above copyright notice, // this list of conditions and the following disclaimer. // * Redistributions in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation // and/or other materials provided with the distribution. // * Neither the name of Adobe Systems Incorporated nor the names of its // contributors may be used to endorse or promote products derived from this // software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE // ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE // LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR // CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN // CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. var Spry; if (!Spry) Spry = {}; if (!Spry.Widget) Spry.Widget = {}; Spry.Widget.BrowserSniff = function() { var b = navigator.appName.toString(); var up = navigator.platform.toString(); var ua = navigator.userAgent.toString(); this.mozilla = this.ie = this.opera = this.safari = false; var re_opera = /Opera.([0-9\.]*)/i; var re_msie = /MSIE.([0-9\.]*)/i; var re_gecko = /gecko/i; var re_safari = /(applewebkit|safari)\/([\d\.]*)/i; var r = false; if ( (r = ua.match(re_opera))) { this.opera = true; this.version = parseFloat(r[1]); } else if ( (r = ua.match(re_msie))) { this.ie = true; this.version = parseFloat(r[1]); } else if ( (r = ua.match(re_safari))) { this.safari = true; this.version = parseFloat(r[2]); } else if (ua.match(re_gecko)) { var re_gecko_version = /rv:\s*([0-9\.]+)/i; r = ua.match(re_gecko_version); this.mozilla = true; this.version = parseFloat(r[1]); } this.windows = this.mac = this.linux = false; this.Platform = ua.match(/windows/i) ? "windows" : (ua.match(/linux/i) ? "linux" : (ua.match(/mac/i) ? "mac" : ua.match(/unix/i)? "unix" : "unknown")); this[this.Platform] = true; this.v = this.version; if (this.safari && this.mac && this.mozilla) { this.mozilla = false; } }; Spry.is = new Spry.Widget.BrowserSniff(); Spry.Widget.ValidationTextField = function(element, type, options) { type = Spry.Widget.Utils.firstValid(type, "none"); if (typeof type != 'string') { this.showError('The second parameter in the constructor should be the validation type, the options are the third parameter.'); return; } if (typeof Spry.Widget.ValidationTextField.ValidationDescriptors[type] == 'undefined') { this.showError('Unknown validation type received as the second parameter.'); return; } options = Spry.Widget.Utils.firstValid(options, {}); this.type = type; if (!this.isBrowserSupported()) { //disable character masking and pattern behaviors for low level browsers options.useCharacterMasking = false; } this.init(element, options); //make sure we validate at least on submit var validateOn = ['submit'].concat(Spry.Widget.Utils.firstValid(this.options.validateOn, [])); validateOn = validateOn.join(","); this.validateOn = 0; this.validateOn = this.validateOn | (validateOn.indexOf('submit') != -1 ? Spry.Widget.ValidationTextField.ONSUBMIT : 0); this.validateOn = this.validateOn | (validateOn.indexOf('blur') != -1 ? Spry.Widget.ValidationTextField.ONBLUR : 0); this.validateOn = this.validateOn | (validateOn.indexOf('change') != -1 ? Spry.Widget.ValidationTextField.ONCHANGE : 0); if (Spry.Widget.ValidationTextField.onloadDidFire) this.attachBehaviors(); else Spry.Widget.ValidationTextField.loadQueue.push(this); }; Spry.Widget.ValidationTextField.ONCHANGE = 1; Spry.Widget.ValidationTextField.ONBLUR = 2; Spry.Widget.ValidationTextField.ONSUBMIT = 4; Spry.Widget.ValidationTextField.ERROR_REQUIRED = 1; Spry.Widget.ValidationTextField.ERROR_FORMAT = 2; Spry.Widget.ValidationTextField.ERROR_RANGE_MIN = 4; Spry.Widget.ValidationTextField.ERROR_RANGE_MAX = 8; Spry.Widget.ValidationTextField.ERROR_CHARS_MIN = 16; Spry.Widget.ValidationTextField.ERROR_CHARS_MAX = 32; /* validation parameters: * - characterMasking : prevent typing of characters not matching an regular expression * - regExpFilter : additional regular expression to disalow typing of characters * (like the "-" sign in the middle of the value); use for partial matching of the currently typed value; * the typed value must match regExpFilter at any moment * - pattern : enforce character on each position inside a pattern (AX0?) * - validation : function performing logic validation; return false if failed and the typedValue value on success * - minValue, maxValue : range validation; check if typedValue inside the specified range * - minChars, maxChars : value length validation; at least/at most number of characters * */ Spry.Widget.ValidationTextField.ValidationDescriptors = { 'none': { }, 'custom': { }, 'integer': { characterMasking: /[\-\+\d]/, regExpFilter: /^[\-\+]?\d*$/, validation: function(value, options) { if (value == '' || value == '-' || value == '+') { return false; } var regExp = /^[\-\+]?\d*$/; if (!regExp.test(value)) { return false; } options = options || {allowNegative:false}; var ret = parseInt(value, 10); if (!isNaN(ret)) { var allowNegative = true; if (typeof options.allowNegative != 'undefined' && options.allowNegative == false) { allowNegative = false; } if (!allowNegative && value < 0) { ret = false; } } else { ret = false; } return ret; } }, 'real': { characterMasking: /[\d\.,\-\+e]/i, regExpFilter: /^[\-\+]?\d(?:|\.,\d{0,2})|(?:|e{0,1}[\-\+]?\d{0,})$/i, validation: function (value, options) { var regExp = /^[\+\-]?[0-9]+([\.,][0-9]+)?([eE]{0,1}[\-\+]?[0-9]+)?$/; if (!regExp.test(value)) { return false; } var ret = parseFloat(value); if (isNaN(ret)) { ret = false; } return ret; } }, 'currency': { formats: { 'dot_comma': { characterMasking: /[\d\.\,\-\+\$]/, regExpFilter: /^[\-\+]?(?:[\d\.]*)+(|\,\d{0,2})$/, validation: function(value, options) { var ret = false; //2 or no digits after the comma if (/^(\-|\+)?\d{1,3}(?:\.\d{3})*(?:\,\d{2}|)$/.test(value) || /^(\-|\+)?\d+(?:\,\d{2}|)$/.test(value)) { value = value.toString().replace(/\./gi, '').replace(/\,/, '.'); ret = parseFloat(value); } return ret; } }, 'comma_dot': { characterMasking: /[\d\.\,\-\+\$]/, regExpFilter: /^[\-\+]?(?:[\d\,]*)+(|\.\d{0,2})$/, validation: function(value, options) { var ret = false; //2 or no digits after the comma if (/^(\-|\+)?\d{1,3}(?:\,\d{3})*(?:\.\d{2}|)$/.test(value) || /^(\-|\+)?\d+(?:\.\d{2}|)$/.test(value)) { value = value.toString().replace(/\,/gi, ''); ret = parseFloat(value); } return ret; } } } }, 'email': { characterMasking: /[^\s]/, validation: function(value, options) { var rx = /^[\w\.-]+@[\w\.-]+\.\w+$/i; return rx.test(value); } }, 'date': { validation: function(value, options) { var formatRegExp = /^([mdy]+)[\.\-\/\\\s]+([mdy]+)[\.\-\/\\\s]+([mdy]+)$/i; var valueRegExp = this.dateValidationPattern; var formatGroups = options.format.match(formatRegExp); var valueGroups = value.match(valueRegExp); if (formatGroups !== null && valueGroups !== null) { var dayIndex = -1; var monthIndex = -1; var yearIndex = -1; for (var i=1; i<formatGroups.length; i++) { switch (formatGroups[i].toLowerCase()) { case "dd": dayIndex = i; break; case "mm": monthIndex = i; break; case "yy": case "yyyy": yearIndex = i; break; } } if (dayIndex != -1 && monthIndex != -1 && yearIndex != -1) { var maxDay = -1; var theDay = parseInt(valueGroups[dayIndex], 10); var theMonth = parseInt(valueGroups[monthIndex], 10); var theYear = parseInt(valueGroups[yearIndex], 10); // Check month value to be between 1..12 if (theMonth < 1 || theMonth > 12) { return false; } // Calculate the maxDay according to the current month switch (theMonth) { case 1: // January case 3: // March case 5: // May case 7: // July case 8: // August case 10: // October case 12: // December maxDay = 31; break; case 4: // April case 6: // June case 9: // September case 11: // November maxDay = 30; break; case 2: // February if ((parseInt(theYear/4, 10) * 4 == theYear) && (theYear % 100 != 0 || theYear % 400 == 0)) { maxDay = 29; } else { maxDay = 28; } break; } // Check day value to be between 1..maxDay if (theDay < 1 || theDay > maxDay) { return false; } // If successfull we'll return the date object return (new Date(theYear, theMonth - 1, theDay)); //JavaScript requires a month between 0 and 11 } } else { return false; } } }, 'time': { validation: function(value, options) { // HH:MM:SS T var formatRegExp = /([hmst]+)/gi; var valueRegExp = /(\d+|AM?|PM?)/gi; var formatGroups = options.format.match(formatRegExp); var valueGroups = value.match(valueRegExp); //mast match and have same length if (formatGroups !== null && valueGroups !== null) { if (formatGroups.length != valueGroups.length) { return false; } var hourIndex = -1; var minuteIndex = -1; var secondIndex = -1; //T is AM or PM var tIndex = -1; var theHour = 0, theMinute = 0, theSecond = 0, theT = 'AM'; for (var i=0; i<formatGroups.length; i++) { switch (formatGroups[i].toLowerCase()) { case "hh": hourIndex = i; break; case "mm": minuteIndex = i; break; case "ss": secondIndex = i; break; case "t": case "tt": tIndex = i; break; } } if (hourIndex != -1) { var theHour = parseInt(valueGroups[hourIndex], 10); if (isNaN(theHour) || theHour > (formatGroups[hourIndex] == 'HH' ? 23 : 12 )) { return false; } } if (minuteIndex != -1) { var theMinute = parseInt(valueGroups[minuteIndex], 10); if (isNaN(theMinute) || theMinute > 59) { return false; } } if (secondIndex != -1) { var theSecond = parseInt(valueGroups[secondIndex], 10); if (isNaN(theSecond) || theSecond > 59) { return false; } } if (tIndex != -1) { var theT = valueGroups[tIndex].toUpperCase(); if ( formatGroups[tIndex].toUpperCase() == 'TT' && !/^a|pm$/i.test(theT) || formatGroups[tIndex].toUpperCase() == 'T' && !/^a|p$/i.test(theT) ) { return false; } } var date = new Date(2000, 0, 1, theHour + (theT.charAt(0) == 'P'?12:0), theMinute, theSecond); return date; } else { return false; } } }, 'credit_card': { characterMasking: /\d/, validation: function(value, options) { var regExp = null; options.format = options.format || 'ALL'; switch (options.format.toUpperCase()) { case 'ALL': regExp = /^[3-6]{1}[0-9]{12,18}$/; break; case 'VISA': regExp = /^4(?:[0-9]{12}|[0-9]{15})$/; break; case 'MASTERCARD': regExp = /^5[1-5]{1}[0-9]{14}$/; break; case 'AMEX': regExp = /^3(4|7){1}[0-9]{13}$/; break; case 'DISCOVER': regExp = /^6011[0-9]{12}$/; break; case 'DINERSCLUB': regExp = /^3(?:(0[0-5]{1}[0-9]{11})|(6[0-9]{12})|(8[0-9]{12}))$/; break; } if (!regExp.test(value)) { return false; } var digits = []; var j = 1, digit = ''; for (var i = value.length - 1; i >= 0; i--) { if ((j%2) == 0) { digit = parseInt(value.charAt(i), 10) * 2; digits[digits.length] = digit.toString().charAt(0); if (digit.toString().length == 2) { digits[digits.length] = digit.toString().charAt(1); } } else { digit = value.charAt(i); digits[digits.length] = digit; } j++; } var sum = 0; for(i=0; i < digits.length; i++ ) { sum += parseInt(digits[i], 10); } if ((sum%10) == 0) { return true; } return false; } }, 'zip_code': { formats: { 'zip_us9': { pattern:'00000-0000' }, 'zip_us5': { pattern:'00000' }, 'zip_uk': { characterMasking: /[\dA-Z\s]/, validation: function(value, options) { //check one of the following masks // AN NAA, ANA NAA, ANN NAA, AAN NAA, AANA NAA, AANN NAA return /^[A-Z]{1,2}\d[\dA-Z]?\s?\d[A-Z]{2}$/.test(value); } }, 'zip_canada': { characterMasking: /[\dA-Z\s]/, pattern: 'A0A 0A0' }, 'zip_custom': {} } }, 'phone_number': { formats: { //US phone number; 10 digits 'phone_us': { pattern:'(000) 000-0000' }, 'phone_custom': {} } }, 'social_security_number': { pattern:'000-00-0000' }, 'ip': { characterMaskingFormats: { 'ipv4': /[\d\.]/i, 'ipv6_ipv4': /[\d\.\:A-F\/]/i, 'ipv6': /[\d\.\:A-F\/]/i }, validation: function (value, options) { return Spry.Widget.ValidationTextField.validateIP(value, options.format); } }, 'url': { characterMasking: /[^\s]/, validation: function(value, options) { //fix for ?ID=223429 and ?ID=223387 /* the following regexp matches components of an URI as specified in http://tools.ietf.org/html/rfc3986#page-51 page 51, Appendix B. scheme = $2 authority = $4 path = $5 query = $7 fragment = $9 */ var URI_spliter = /^(([^:\/?#]+):)?(\/\/([^\/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/; var parts = value.match(URI_spliter); if (parts && parts[4]) { //encode each component of the domain name using Punycode encoding scheme: http://tools.ietf.org/html/rfc3492 var host = parts[4].split("."); var punyencoded = ''; for (var i=0; i<host.length; i++) { punyencoded = Spry.Widget.Utils.punycode_encode(host[i], 64); if (!punyencoded) { return false; } else { if (punyencoded != (host[i] + "-")) { host[i] = 'xn--' + punyencoded; } } } host = host .join("."); //the encoded domain name is replaced into the original URL to be validated again later as URL value = value.replace(URI_spliter, "$1//" + host + "$5$6$8"); } //fix for ?ID=223358 and ?ID=223594 //the following validates an URL using ABNF rules as defined in http://tools.ietf.org/html/rfc3986 , Appendix A., page 49 //except host which is extracted by match[1] and validated separately /* * userinfo= (?:(?:[a-z0-9\-\._~\!\$\&\'\(\)\*\+\,\;\=:]|%[0-9a-f]{2,2})*\@)? * host= (?:((?:(?:[a-z0-9][a-z0-9\-]*[a-z0-9]|[a-z0-9])\.)*(?:[a-z][a-z0-9\-]*[a-z0-9]|[a-z])|(?:\[[^\]]*\])) * pathname= (?:\/(?:[a-z0-9\-\._~\!\$\&\'\(\)\*\+\,\;\=\:\@]|%[0-9a-f]{2,2})*)* * query= (?:\?(?:[a-z0-9\-\._~\!\$\&\'\(\)\*\+\,\;\=\:\@\/\?]|%[0-9a-f]{2,2})*)? * anchor= (?:\#(?:[a-z0-9\-\._~\!\$\&\'\(\)\*\+\,\;\=\:\@\/\?]|%[0-9a-f]{2,2})*)? */ var regExp = /^(?:https?|ftp)\:\/\/(?:(?:[a-z0-9\-\._~\!\$\&\'\(\)\*\+\,\;\=:]|%[0-9a-f]{2,2})*\@)?(?:((?:(?:[a-z0-9][a-z0-9\-]*[a-z0-9]|[a-z0-9])\.)*(?:[a-z][a-z0-9\-]*[a-z0-9]|[a-z])|(?:\[[^\]]*\]))(?:\:[0-9]*)?)(?:\/(?:[a-z0-9\-\._~\!\$\&\'\(\)\*\+\,\;\=\:\@]|%[0-9a-f]{2,2})*)*(?:\?(?:[a-z0-9\-\._~\!\$\&\'\(\)\*\+\,\;\=\:\@\/\?]|%[0-9a-f]{2,2})*)?(?:\#(?:[a-z0-9\-\._~\!\$\&\'\(\)\*\+\,\;\=\:\@\/\?]|%[0-9a-f]{2,2})*)?$/i; var valid = value.match(regExp); if (valid) { //extract the address from URL var address = valid[1]; if (address) { if (address == '[]') { return false; } if (address.charAt(0) == '[' ) { //IPv6 address or IPv4 enclosed in square brackets address = address.replace(/^\[|\]$/gi, ''); return Spry.Widget.ValidationTextField.validateIP(address, 'ipv6_ipv4'); } else { if (/[^0-9\.]/.test(address)) { return true; } else { //check if hostname is all digits and dots and then check for IPv4 return Spry.Widget.ValidationTextField.validateIP(address, 'ipv4'); } } } else { return true; } } else { return false; } } } }; /* 2.2.1. Preferred x:x:x:x:x:x:x:x, where the 'x's are the hexadecimal values of the eight 16-bit pieces of the address. Examples: FEDC:BA98:7654:3210:FEDC:BA98:7654:3210 1080:0:0:0:8:800:200C:417A Note that it is not necessary to write the leading zeros in an individual field, but there must be at least one numeral in every field (except for the case described in 2.2.2.). 2.2.2. Compressed The use of "::" indicates multiple groups of 16-bits of zeros. The "::" can only appear once in an address. The "::" can also be used to compress the leading and/or trailing zeros in an address. 1080:0:0:0:8:800:200C:417A --> 1080::8:800:200C:417A FF01:0:0:0:0:0:0:101 --> FF01::101 0:0:0:0:0:0:0:1 --> ::1 0:0:0:0:0:0:0:0 --> :: 2.5.4 IPv6 Addresses with Embedded IPv4 Addresses IPv4-compatible IPv6 address (tunnel IPv6 packets over IPv4 routing infrastructures) ::0:129.144.52.38 IPv4-mapped IPv6 address (represent the addresses of IPv4-only nodes as IPv6 addresses) ::ffff:129.144.52.38 The text representation of IPv6 addresses and prefixes in Augmented BNF (Backus-Naur Form) [ABNF] for reference purposes. [ABNF http://tools.ietf.org/html/rfc2234] IPv6address = hexpart [ ":" IPv4address ] IPv4address = 1*3DIGIT "." 1*3DIGIT "." 1*3DIGIT "." 1*3DIGIT IPv6prefix = hexpart "/" 1*2DIGIT hexpart = hexseq | hexseq "::" [ hexseq ] | "::" [ hexseq ] hexseq = hex4 *( ":" hex4) hex4 = 1*4HEXDIG */ Spry.Widget.ValidationTextField.validateIP = function (value, format) { var validIPv6Addresses = [ //preferred /^(?:[a-f0-9]{1,4}:){7}[a-f0-9]{1,4}(?:\/\d{1,3})?$/i, //various compressed /^[a-f0-9]{0,4}::(?:\/\d{1,3})?$/i, /^:(?::[a-f0-9]{1,4}){1,6}(?:\/\d{1,3})?$/i, /^(?:[a-f0-9]{1,4}:){1,6}:(?:\/\d{1,3})?$/i, /^(?:[a-f0-9]{1,4}:)(?::[a-f0-9]{1,4}){1,6}(?:\/\d{1,3})?$/i, /^(?:[a-f0-9]{1,4}:){2}(?::[a-f0-9]{1,4}){1,5}(?:\/\d{1,3})?$/i, /^(?:[a-f0-9]{1,4}:){3}(?::[a-f0-9]{1,4}){1,4}(?:\/\d{1,3})?$/i, /^(?:[a-f0-9]{1,4}:){4}(?::[a-f0-9]{1,4}){1,3}(?:\/\d{1,3})?$/i, /^(?:[a-f0-9]{1,4}:){5}(?::[a-f0-9]{1,4}){1,2}(?:\/\d{1,3})?$/i, /^(?:[a-f0-9]{1,4}:){6}(?::[a-f0-9]{1,4})(?:\/\d{1,3})?$/i, //IPv6 mixes with IPv4 /^(?:[a-f0-9]{1,4}:){6}(?:\d{1,3}\.){3}\d{1,3}(?:\/\d{1,3})?$/i, /^:(?::[a-f0-9]{1,4}){0,4}:(?:\d{1,3}\.){3}\d{1,3}(?:\/\d{1,3})?$/i, /^(?:[a-f0-9]{1,4}:){1,5}:(?:\d{1,3}\.){3}\d{1,3}(?:\/\d{1,3})?$/i, /^(?:[a-f0-9]{1,4}:)(?::[a-f0-9]{1,4}){1,4}:(?:\d{1,3}\.){3}\d{1,3}(?:\/\d{1,3})?$/i, /^(?:[a-f0-9]{1,4}:){2}(?::[a-f0-9]{1,4}){1,3}:(?:\d{1,3}\.){3}\d{1,3}(?:\/\d{1,3})?$/i, /^(?:[a-f0-9]{1,4}:){3}(?::[a-f0-9]{1,4}){1,2}:(?:\d{1,3}\.){3}\d{1,3}(?:\/\d{1,3})?$/i, /^(?:[a-f0-9]{1,4}:){4}(?::[a-f0-9]{1,4}):(?:\d{1,3}\.){3}\d{1,3}(?:\/\d{1,3})?$/i ]; var validIPv4Addresses = [ //IPv4 /^(\d{1,3}\.){3}\d{1,3}$/i ]; var validAddresses = []; if (format == 'ipv6' || format == 'ipv6_ipv4') { validAddresses = validAddresses.concat(validIPv6Addresses); } if (format == 'ipv4' || format == 'ipv6_ipv4') { validAddresses = validAddresses.concat(validIPv4Addresses); } var ret = false; for (var i=0; i<validAddresses.length; i++) { if (validAddresses[i].test(value)) { ret = true; break; } } if (ret && value.indexOf(".") != -1) { //if address contains IPv4 fragment, it must be valid; all 4 groups must be less than 256 var ipv4 = value.match(/:?(?:\d{1,3}\.){3}\d{1,3}/i); if(!ipv4) { return false; } ipv4 = ipv4[0].replace(/^:/, ''); var pieces = ipv4.split('.'); if (pieces.length != 4) { return false; } var regExp = /^[\-\+]?\d*$/; for (var i=0; i< pieces.length; i++) { if (pieces[i] == '') { return false; } var piece = parseInt(pieces[i], 10); if (isNaN(piece) || piece > 255 || !regExp.test(pieces[i]) || pieces[i].length>3 || /^0{2,3}$/.test(pieces[i])) { return false; } } } if (ret && value.indexOf("/") != -1) { // if prefix-length is specified must be in [1-128] var prefLen = value.match(/\/\d{1,3}$/); if (!prefLen) return false; var prefLenVal = parseInt(prefLen[0].replace(/^\//,''), 10); if (isNaN(prefLenVal) || prefLenVal > 128 || prefLenVal < 1) { return false; } } return ret; }; Spry.Widget.ValidationTextField.onloadDidFire = false; Spry.Widget.ValidationTextField.loadQueue = []; Spry.Widget.ValidationTextField.prototype.isBrowserSupported = function() { return Spry.is.ie && Spry.is.v >= 5 && Spry.is.windows || Spry.is.mozilla && Spry.is.v >= 1.4 || Spry.is.safari || Spry.is.opera && Spry.is.v >= 9; }; Spry.Widget.ValidationTextField.prototype.init = function(element, options) { this.element = this.getElement(element); this.errors = 0; this.flags = {locked: false, restoreSelection: true}; this.options = {}; this.event_handlers = []; this.validClass = "textfieldValidState"; this.focusClass = "textfieldFocusState"; this.requiredClass = "textfieldRequiredState"; this.hintClass = "textfieldHintState"; this.invalidFormatClass = "textfieldInvalidFormatState"; this.invalidRangeMinClass = "textfieldMinValueState"; this.invalidRangeMaxClass = "textfieldMaxValueState"; this.invalidCharsMinClass = "textfieldMinCharsState"; this.invalidCharsMaxClass = "textfieldMaxCharsState"; this.textfieldFlashTextClass = "textfieldFlashText"; if (Spry.is.safari) { this.flags.lastKeyPressedTimeStamp = 0; } switch (this.type) { case 'phone_number':options.format = Spry.Widget.Utils.firstValid(options.format, 'phone_us');break; case 'currency':options.format = Spry.Widget.Utils.firstValid(options.format, 'comma_dot');break; case 'zip_code':options.format = Spry.Widget.Utils.firstValid(options.format, 'zip_us5');break; case 'date': options.format = Spry.Widget.Utils.firstValid(options.format, 'mm/dd/yy'); break; case 'time': options.format = Spry.Widget.Utils.firstValid(options.format, 'HH:mm'); options.pattern = options.format.replace(/[hms]/gi, "0").replace(/TT/gi, 'AM').replace(/T/gi, 'A'); break; case 'ip': options.format = Spry.Widget.Utils.firstValid(options.format, 'ipv4'); options.characterMasking = Spry.Widget.ValidationTextField.ValidationDescriptors[this.type].characterMaskingFormats[options.format]; break; } //retrieve the validation type descriptor to be used with this instance (base on type and format) //widgets may have different validations depending on format (like zip_code with formats) var validationDescriptor = {}; if (options.format && Spry.Widget.ValidationTextField.ValidationDescriptors[this.type].formats) { if (Spry.Widget.ValidationTextField.ValidationDescriptors[this.type].formats[options.format]) { Spry.Widget.Utils.setOptions(validationDescriptor, Spry.Widget.ValidationTextField.ValidationDescriptors[this.type].formats[options.format]); } } else { Spry.Widget.Utils.setOptions(validationDescriptor, Spry.Widget.ValidationTextField.ValidationDescriptors[this.type]); } //set default values for some parameters which were not aspecified options.useCharacterMasking = Spry.Widget.Utils.firstValid(options.useCharacterMasking, false); options.hint = Spry.Widget.Utils.firstValid(options.hint, ''); options.isRequired = Spry.Widget.Utils.firstValid(options.isRequired, true); options.additionalError = Spry.Widget.Utils.firstValid(options.additionalError, false); if (options.additionalError) options.additionalError = this.getElement(options.additionalError); //set widget validation parameters //get values from validation type descriptor //use the user specified values, if defined options.characterMasking = Spry.Widget.Utils.firstValid(options.characterMasking, validationDescriptor.characterMasking); options.regExpFilter = Spry.Widget.Utils.firstValid(options.regExpFilter, validationDescriptor.regExpFilter); options.pattern = Spry.Widget.Utils.firstValid(options.pattern, validationDescriptor.pattern); options.validation = Spry.Widget.Utils.firstValid(options.validation, validationDescriptor.validation); if (typeof options.validation == 'string') { options.validation = eval(options.validation); } options.minValue = Spry.Widget.Utils.firstValid(options.minValue, validationDescriptor.minValue); options.maxValue = Spry.Widget.Utils.firstValid(options.maxValue, validationDescriptor.maxValue); options.minChars = Spry.Widget.Utils.firstValid(options.minChars, validationDescriptor.minChars); options.maxChars = Spry.Widget.Utils.firstValid(options.maxChars, validationDescriptor.maxChars); Spry.Widget.Utils.setOptions(this, options); Spry.Widget.Utils.setOptions(this.options, options); }; Spry.Widget.ValidationTextField.prototype.destroy = function() { if (this.event_handlers) for (var i=0; i<this.event_handlers.length; i++) { Spry.Widget.Utils.removeEventListener(this.event_handlers[i][0], this.event_handlers[i][1], this.event_handlers[i][2], false); } try { delete this.element; } catch(err) {} try { delete this.input; } catch(err) {} try { delete this.form; } catch(err) {} try { delete this.event_handlers; } catch(err) {} try { this.selection.destroy(); } catch(err) {} try { delete this.selection; } catch(err) {} var q = Spry.Widget.Form.onSubmitWidgetQueue; var qlen = q.length; for (var i = 0; i < qlen; i++) { if (q[i] == this) { q.splice(i, 1); break; } } }; Spry.Widget.ValidationTextField.prototype.attachBehaviors = function() { if (this.element) { if (this.element.nodeName == "INPUT") { this.input = this.element; } else { this.input = Spry.Widget.Utils.getFirstChildWithNodeNameAtAnyLevel(this.element, "INPUT"); } } if (this.input) { if (this.maxChars) { this.input.removeAttribute("maxLength"); } this.putHint(); this.compilePattern(); if (this.type == 'date') { this.compileDatePattern(); } this.input.setAttribute("AutoComplete", "off"); this.selection = new Spry.Widget.SelectionDescriptor(this.input); this.oldValue = this.input.value; var self = this; this.event_handlers = []; this.event_handlers.push([this.input, "keydown", function(e) { if (self.isDisabled()) return true; return self.onKeyDown(e || event); }]); this.event_handlers.push([this.input, "keypress", function(e) { if (self.isDisabled()) return true; return self.onKeyPress(e || event); }]); if (Spry.is.opera) { this.event_handlers.push([this.input, "keyup", function(e) { if (self.isDisabled()) return true; return self.onKeyUp(e || event); }]); } this.event_handlers.push([this.input, "focus", function(e) { if (self.isDisabled()) return true; return self.onFocus(e || event); }]); this.event_handlers.push([this.input, "blur", function(e) { if (self.isDisabled()) return true; return self.onBlur(e || event); }]); this.event_handlers.push([this.input, "mousedown", function(e) { if (self.isDisabled()) return true; return self.onMouseDown(e || event); }]); var changeEvent = Spry.is.mozilla || Spry.is.opera || Spry.is.safari?"input": Spry.is.ie?"propertychange": "change"; this.event_handlers.push([this.input, changeEvent, function(e) { if (self.isDisabled()) return true; return self.onChange(e || event); }]); if (Spry.is.mozilla || Spry.is.safari) { //oninput event on mozilla does not fire ondragdrop this.event_handlers.push([this.input, "dragdrop", function(e) { if (self.isDisabled()) return true; self.removeHint();return self.onChange(e || event); }]); } else if (Spry.is.ie){ //ondrop&onpropertychange crash on IE this.event_handlers.push([this.input, "drop", function(e) { if (self.isDisabled()) return true; return self.onDrop(e || event); }]); } for (var i=0; i<this.event_handlers.length; i++) { Spry.Widget.Utils.addEventListener(this.event_handlers[i][0], this.event_handlers[i][1], this.event_handlers[i][2], false); } // submit this.form = Spry.Widget.Utils.getFirstParentWithNodeName(this.input, "FORM"); if (this.form) { // if no "onSubmit" handler has been attached to the current form, attach one if (!this.form.attachedSubmitHandler && !this.form.onsubmit) { this.form.onsubmit = function(e) { e = e || event; return Spry.Widget.Form.onSubmit(e, e.srcElement || e.currentTarget) }; this.form.attachedSubmitHandler = true; } if (!this.form.attachedResetHandler) { Spry.Widget.Utils.addEventListener(this.form, "reset", function(e) { e = e || event; return Spry.Widget.Form.onReset(e, e.srcElement || e.currentTarget) }, false); this.form.attachedResetHandler = true; } // add the currrent widget to the "onSubmit" check queue; Spry.Widget.Form.onSubmitWidgetQueue.push(this); } } }; Spry.Widget.ValidationTextField.prototype.isDisabled = function() { return this.input && (this.input.disabled || this.input.readOnly) || !this.input; }; Spry.Widget.ValidationTextField.prototype.getElement = function(ele) { if (ele && typeof ele == "string") return document.getElementById(ele); return ele; }; Spry.Widget.ValidationTextField.addLoadListener = function(handler) { if (typeof window.addEventListener != 'undefined') window.addEventListener('load', handler, false); else if (typeof document.addEventListener != 'undefined') document.addEventListener('load', handler, false); else if (typeof window.attachEvent != 'undefined') window.attachEvent('onload', handler); }; Spry.Widget.ValidationTextField.processLoadQueue = function(handler) { Spry.Widget.ValidationTextField.onloadDidFire = true; var q = Spry.Widget.ValidationTextField.loadQueue; var qlen = q.length; for (var i = 0; i < qlen; i++) q[i].attachBehaviors(); }; Spry.Widget.ValidationTextField.addLoadListener(Spry.Widget.ValidationTextField.processLoadQueue); Spry.Widget.ValidationTextField.addLoadListener(function(){ Spry.Widget.Utils.addEventListener(window, "unload", Spry.Widget.Form.destroyAll, false); }); Spry.Widget.ValidationTextField.prototype.setValue = function(newValue) { this.flags.locked = true; this.input.value = newValue; this.flags.locked = false; this.oldValue = newValue; if (!Spry.is.ie) { this.onChange(); } }; /** * save the state of the input (selection and value) so we can revert to it * should call this just before modifying the input value */ Spry.Widget.ValidationTextField.prototype.saveState = function() { this.oldValue = this.input.value; this.selection.update(); }; Spry.Widget.ValidationTextField.prototype.revertState = function(revertValue) { if (revertValue != this.input.value) { this.input.readOnly = true; this.input.value = revertValue; this.input.readOnly = false; if (Spry.is.safari && this.flags.active) { this.input.focus(); } } if (this.flags.restoreSelection) { this.selection.moveTo(this.selection.start, this.selection.end); } this.redTextFlash(); }; Spry.Widget.ValidationTextField.prototype.removeHint = function() { if (this.flags.hintOn) { this.input.value = ""; this.flags.hintOn = false; this.removeClassName(this.element, this.hintClass); this.removeClassName(this.additionalError, this.hintClass); } }; Spry.Widget.ValidationTextField.prototype.putHint = function() { if(this.hint && this.input && this.input.type == "text" && this.input.value == "") { this.flags.hintOn = true; this.input.value = this.hint; this.addClassName(this.element, this.hintClass); this.addClassName(this.additionalError, this.hintClass); } }; Spry.Widget.ValidationTextField.prototype.redTextFlash = function() { var self = this; this.addClassName(this.element, this.textfieldFlashTextClass); setTimeout(function() { self.removeClassName(self.element, self.textfieldFlashTextClass) }, 100); }; Spry.Widget.ValidationTextField.prototype.doValidations = function(testValue, revertValue) { if (this.isDisabled()) return false; if (this.flags.locked) { return false; } if (testValue.length == 0 && !this.isRequired) { this.errors = 0; return false; } this.flags.locked = true; var mustRevert = false; var continueValidations = true; if (!this.options.isRequired && testValue.length == 0) { continueValidations = false; } var errors = 0; var fixedValue = testValue; //characterMasking - test if all characters are valid with the characterMasking (keyboard filter) if (this.useCharacterMasking && this.characterMasking) { for(var i=0; i<testValue.length; i++) { if (!this.characterMasking.test(testValue.charAt(i))) { errors = errors | Spry.Widget.ValidationTextField.ERROR_FORMAT; fixedValue = revertValue; mustRevert = true; break; } } } //regExpFilter - character mask positioning (additional mask to restrict some characters only in some position) if (!mustRevert && this.useCharacterMasking && this.regExpFilter) { if (!this.regExpFilter.test(fixedValue)) { errors = errors | Spry.Widget.ValidationTextField.ERROR_FORMAT; mustRevert = true; } } //pattern - testValue matches the pattern so far if (!mustRevert && this.pattern) { var currentRegExp = this.patternToRegExp(testValue.length); if (!currentRegExp.test(testValue)) { errors = errors | Spry.Widget.ValidationTextField.ERROR_FORMAT; mustRevert = true; } else if (this.patternLength != testValue.length) { //testValue matches pattern so far, but it's not ok if it does not have the proper length //do not revert, but should show the error errors = errors | Spry.Widget.ValidationTextField.ERROR_FORMAT; } } if (fixedValue == '') { errors = errors | Spry.Widget.ValidationTextField.ERROR_REQUIRED; } if (!mustRevert && this.pattern && this.useCharacterMasking) { var n = this.getAutoComplete(testValue.length); if (n) { fixedValue += n; } } if(!mustRevert && this.minChars !== null && continueValidations) { if (testValue.length < this.minChars) { errors = errors | Spry.Widget.ValidationTextField.ERROR_CHARS_MIN; continueValidations = false; } } if(!mustRevert && this.maxChars !== null && continueValidations) { if (testValue.length > this.maxChars) { errors = errors | Spry.Widget.ValidationTextField.ERROR_CHARS_MAX; continueValidations = false; } } //validation - testValue passes widget validation function if (!mustRevert && this.validation && continueValidations) { var value = this.validation(fixedValue, this.options); if (false === value) { errors = errors | Spry.Widget.ValidationTextField.ERROR_FORMAT; continueValidations = false; } else { this.typedValue = value; } } if(!mustRevert && this.validation && this.minValue !== null && continueValidations) { var minValue = this.validation(this.minValue.toString(), this.options); if (minValue !== false) { if (this.typedValue < minValue) { errors = errors | Spry.Widget.ValidationTextField.ERROR_RANGE_MIN; continueValidations = false; } } } if(!mustRevert && this.validation && this.maxValue !== null && continueValidations) { var maxValue = this.validation(this.maxValue.toString(), this.options); if (maxValue !== false) { if( this.typedValue > maxValue) { errors = errors | Spry.Widget.ValidationTextField.ERROR_RANGE_MAX; continueValidations = false; } } } //an invalid value was tested; must make sure it does not get inside the input if (this.useCharacterMasking && mustRevert) { this.revertState(revertValue); } this.errors = errors; this.fixedValue = fixedValue; this.flags.locked = false; return mustRevert; }; Spry.Widget.ValidationTextField.prototype.onChange = function(e) { if (Spry.is.opera && this.flags.operaRevertOnKeyUp) { return true; } if (Spry.is.ie && e && e.propertyName != 'value') { return true; } if (this.flags.drop) { //delay this if it's a drop operation var self = this; setTimeout(function() { self.flags.drop = false; self.onChange(null); }, 0); return; } if (this.flags.hintOn) { return true; } if (this.keyCode == 8 || this.keyCode == 46 ) { var mustRevert = this.doValidations(this.input.value, this.input.value); this.oldValue = this.input.value; if ((mustRevert || this.errors) && this.validateOn & Spry.Widget.ValidationTextField.ONCHANGE) { var self = this; setTimeout(function() {self.validate();}, 0); return true; } } var mustRevert = this.doValidations(this.input.value, this.oldValue); if ((!mustRevert || this.errors) && this.validateOn & Spry.Widget.ValidationTextField.ONCHANGE) { var self = this; setTimeout(function() {self.validate();}, 0); } return true; }; Spry.Widget.ValidationTextField.prototype.onKeyUp = function(e) { if (this.flags.operaRevertOnKeyUp) { this.setValue(this.oldValue); Spry.Widget.Utils.stopEvent(e); this.selection.moveTo(this.selection.start, this.selection.start); this.flags.operaRevertOnKeyUp = false; return false; } if (this.flags.operaPasteOperation) { window.clearInterval(this.flags.operaPasteOperation); this.flags.operaPasteOperation = null; } }; Spry.Widget.ValidationTextField.prototype.operaPasteMonitor = function() { if (this.input.value != this.oldValue) { var mustRevert = this.doValidations(this.input.value, this.input.value); if (mustRevert) { this.setValue(this.oldValue); this.selection.moveTo(this.selection.start, this.selection.start); } else { this.onChange(); } } }; Spry.Widget.ValidationTextField.prototype.compileDatePattern = function () { var dateValidationPatternString = ""; var groupPatterns = []; var fullGroupPatterns = []; var autocompleteCharacters = []; var formatRegExp = /^([mdy]+)([\.\-\/\\\s]+)([mdy]+)([\.\-\/\\\s]+)([mdy]+)$/i; var formatGroups = this.options.format.match(formatRegExp); if (formatGroups !== null) { for (var i=1; i<formatGroups.length; i++) { switch (formatGroups[i].toLowerCase()) { case "dd": groupPatterns[i-1] = "\\d{1,2}"; fullGroupPatterns[i-1] = "\\d\\d"; dateValidationPatternString += "(" + groupPatterns[i-1] + ")"; autocompleteCharacters[i-1] = null; break; case "mm": groupPatterns[i-1] = "\\d{1,2}"; fullGroupPatterns[i-1] = "\\d\\d"; dateValidationPatternString += "(" + groupPatterns[i-1] + ")"; autocompleteCharacters[i-1] = null; break; case "yy": groupPatterns[i-1] = "\\d{1,2}"; fullGroupPatterns[i-1] = "\\d\\d"; dateValidationPatternString += "(\\d\\d)"; autocompleteCharacters[i-1] = null; break; case "yyyy": groupPatterns[i-1] = "\\d{1,4}"; fullGroupPatterns[i-1] = "\\d\\d\\d\\d"; dateValidationPatternString += "(\\d\\d\\d\\d)"; autocompleteCharacters[i-1] = null; break; default: groupPatterns[i-1] = fullGroupPatterns[i-1] = Spry.Widget.ValidationTextField.regExpFromChars(formatGroups[i]); dateValidationPatternString += "["+ groupPatterns[i-1] + "]"; autocompleteCharacters[i-1] = formatGroups[i]; } } } this.dateValidationPattern = new RegExp("^" + dateValidationPatternString + "$" , ""); this.dateAutocompleteCharacters = autocompleteCharacters; this.dateGroupPatterns = groupPatterns; this.dateFullGroupPatterns = fullGroupPatterns; this.lastDateGroup = formatGroups.length-2; }; Spry.Widget.ValidationTextField.prototype.getRegExpForGroup = function (group) { var ret = '^'; for (var j = 0; j <= group; j++) ret += this.dateGroupPatterns[j]; ret += '$'; return new RegExp(ret, ""); }; Spry.Widget.ValidationTextField.prototype.getRegExpForFullGroup = function (group) { var ret = '^'; for (var j = 0; j < group; j++) ret += this.dateGroupPatterns[j]; ret += this.dateFullGroupPatterns[group]; return new RegExp(ret, ""); }; Spry.Widget.ValidationTextField.prototype.getDateGroup = function(value, pos) { if (pos == 0) return 0; var test_value = value.substring(0, pos); for (var i=0; i <= this.lastDateGroup; i++) if (this.getRegExpForGroup(i).test(test_value)) return i; return -1; }; Spry.Widget.ValidationTextField.prototype.isDateGroupFull = function(value, group) { return this.getRegExpForFullGroup(group).test(value); }; Spry.Widget.ValidationTextField.prototype.isValueValid = function(value, pos, group) { var test_value = value.substring(0, pos); return this.getRegExpForGroup(group).test(test_value); }; Spry.Widget.ValidationTextField.prototype.isPositionAtEndOfGroup = function (value, pos, group) { var test_value = value.substring(0, pos); return this.getRegExpForFullGroup(group).test(test_value); }; Spry.Widget.ValidationTextField.prototype.nextDateDelimiterExists = function (value, pos, group) { var autocomplete = this.dateAutocompleteCharacters[group+1]; if (value.length < pos + autocomplete.length) return false; else { var test_value = value.substring(pos, pos+autocomplete.length); if (test_value == autocomplete) return true; } return false; }; Spry.Widget.ValidationTextField.prototype.onKeyPress = function(e) { if (this.flags.skp) { this.flags.skp = false; Spry.Widget.Utils.stopEvent(e); return false; } if (e.ctrlKey || e.metaKey || !this.useCharacterMasking) { return true; } /* if (Spry.is.safari) { if ( (e.timeStamp - this.flags.lastKeyPressedTimeStamp)<10 ) { return true; } this.flags.lastKeyPressedTimeStamp = e.timeStamp; } */ if (Spry.is.opera && this.flags.operaRevertOnKeyUp) { Spry.Widget.Utils.stopEvent(e); return false; } if (this.keyCode == 8 || this.keyCode == 46) { var mr = this.doValidations(this.input.value, this.input.value); if (mr) { return true; } } var pressed = Spry.Widget.Utils.getCharacterFromEvent(e); if (pressed && this.characterMasking) { if (!this.characterMasking.test(pressed)) { Spry.Widget.Utils.stopEvent(e); this.redTextFlash(); return false; } } if(pressed && this.pattern) { var currentPatternChar = this.patternCharacters[this.selection.start]; if (/[ax]/i.test(currentPatternChar)) { //convert the entered character to the pattern character case if (currentPatternChar.toLowerCase() == currentPatternChar) { pressed = pressed.toLowerCase(); } else { pressed = pressed.toUpperCase(); } } var autocomplete = this.getAutoComplete(this.selection.start); if (this.selection.start == this.oldValue.length) { if (this.oldValue.length < this.patternLength) { if (autocomplete) { Spry.Widget.Utils.stopEvent(e); var futureValue = this.oldValue.substring(0, this.selection.start) + autocomplete + pressed; var mustRevert = this.doValidations(futureValue, this.oldValue); if (!mustRevert) { this.setValue(this.fixedValue); this.selection.moveTo(this.fixedValue.length, this.fixedValue.length); } else { this.setValue(this.oldValue.substring(0, this.selection.start) + autocomplete); this.selection.moveTo(this.selection.start + autocomplete.length, this.selection.start + autocomplete.length); } return false; } } else { Spry.Widget.Utils.stopEvent(e); this.setValue(this.input.value); return false; } } else if (autocomplete) { Spry.Widget.Utils.stopEvent(e); this.selection.moveTo(this.selection.start + autocomplete.length, this.selection.start + autocomplete.length); return false; } Spry.Widget.Utils.stopEvent(e); var futureValue = this.oldValue.substring(0, this.selection.start) + pressed + this.oldValue.substring(this.selection.start + 1); var mustRevert = this.doValidations(futureValue, this.oldValue); if (!mustRevert) { autocomplete = this.getAutoComplete(this.selection.start + 1); this.setValue(this.fixedValue); this.selection.moveTo(this.selection.start + 1 + autocomplete.length, this.selection.start + 1 + autocomplete.length); } else { this.selection.moveTo(this.selection.start, this.selection.start); } return false; } if (pressed && this.type == 'date' && this.useCharacterMasking) { var group = this.getDateGroup(this.oldValue, this.selection.start); if (group != -1) { Spry.Widget.Utils.stopEvent(e); if ( (group % 2) !=0 ) group ++; if (this.isDateGroupFull(this.oldValue, group)) { if(this.isPositionAtEndOfGroup(this.oldValue, this.selection.start, group)) { if(group == this.lastDateGroup) { this.redTextFlash(); return false; } else { // add or jump over autocomplete delimiter var autocomplete = this.dateAutocompleteCharacters[group+1]; if (this.nextDateDelimiterExists(this.oldValue, this.selection.start, group)) { var autocomplete = this.dateAutocompleteCharacters[group+1]; this.selection.moveTo(this.selection.start + autocomplete.length, this.selection.start + autocomplete.length); if (pressed == autocomplete) return false; if (this.isDateGroupFull(this.oldValue, group+2)) // need to overwrite first char in the next digit group futureValue = this.oldValue.substring(0, this.selection.start) + pressed + this.oldValue.substring(this.selection.start + 1); else futureValue = this.oldValue.substring(0, this.selection.start) + pressed + this.oldValue.substring(this.selection.start); if (!this.isValueValid(futureValue, this.selection.start + 1, group +2 )) { this.redTextFlash(); return false; } else { this.setValue (futureValue); this.selection.moveTo(this.selection.start + 1, this.selection.start + 1); } return false; } else { var autocomplete = this.dateAutocompleteCharacters[group+1]; var insertedValue = autocomplete + pressed; futureValue = this.oldValue.substring(0, this.selection.start) + insertedValue + this.oldValue.substring(this.selection.start); if (!this.isValueValid(futureValue, this.selection.start + insertedValue.length, group +2 )) { // block this type insertedValue = autocomplete; futureValue = this.oldValue.substring(0, this.selection.start) + insertedValue + this.oldValue.substring(this.selection.start); this.setValue (futureValue); this.selection.moveTo(this.selection.start + insertedValue.length, this.selection.start + insertedValue.length); this.redTextFlash(); return false; } else { this.setValue (futureValue); this.selection.moveTo(this.selection.start + insertedValue.length, this.selection.start + insertedValue.length); return false; } } } } else { // it's not the end of the full digits group // overwrite var movePosition = 1; futureValue = this.oldValue.substring(0, this.selection.start) + pressed + this.oldValue.substring(this.selection.start + 1); if (!this.isValueValid(futureValue, this.selection.start + 1, group)) { this.redTextFlash(); return false; } else { if(this.isPositionAtEndOfGroup(futureValue, this.selection.start+1, group)) { if (group != this.lastDateGroup) { if (this.nextDateDelimiterExists(futureValue, this.selection.start + 1, group)) { var autocomplete = this.dateAutocompleteCharacters[group+1]; movePosition = 1 + autocomplete.length; } else { var autocomplete = this.dateAutocompleteCharacters[group+1]; futureValue = this.oldValue.substring(0, this.selection.start) + pressed + autocomplete + this.oldValue.substring(this.selection.start + 1); movePosition = 1 + autocomplete.length; } } } this.setValue (futureValue); this.selection.moveTo(this.selection.start + movePosition, this.selection.start + movePosition); return false; } } } else { // date group is not full // insert futureValue = this.oldValue.substring(0, this.selection.start) + pressed + this.oldValue.substring(this.selection.start); var movePosition = 1; if (!this.isValueValid(futureValue, this.selection.start + 1, group) && !this.isValueValid(futureValue, this.selection.start + 1, group+1)) { this.redTextFlash(); return false; } else { var autocomplete = this.dateAutocompleteCharacters[group+1]; if (pressed == autocomplete) { if (this.nextDateDelimiterExists(this.oldValue, this.selection.start, group)) { futureValue = this.oldValue; movePosition = 1; } } else { if(this.isPositionAtEndOfGroup(futureValue, this.selection.start+1, group)) { if (group != this.lastDateGroup) { if (this.nextDateDelimiterExists(futureValue, this.selection.start + 1, group)) { var autocomplete = this.dateAutocompleteCharacters[group+1]; movePosition = 1 + autocomplete.length; } else { var autocomplete = this.dateAutocompleteCharacters[group+1]; futureValue = this.oldValue.substring(0, this.selection.start) + pressed + autocomplete + this.oldValue.substring(this.selection.start + 1); movePosition = 1 + autocomplete.length; } } } } this.setValue (futureValue); this.selection.moveTo(this.selection.start + movePosition, this.selection.start + movePosition); return false; } } } return false; } }; Spry.Widget.ValidationTextField.prototype.onKeyDown = function(e) { this.saveState(); this.keyCode = e.keyCode; if (Spry.is.opera) { if (this.flags.operaPasteOperation) { window.clearInterval(this.flags.operaPasteOperation); this.flags.operaPasteOperation = null; } if (e.ctrlKey) { var pressed = Spry.Widget.Utils.getCharacterFromEvent(e); if (pressed && 'vx'.indexOf(pressed.toLowerCase()) != -1) { var self = this; this.flags.operaPasteOperation = window.setInterval(function() { self.operaPasteMonitor();}, 1); return true; } } } if (this.keyCode != 8 && this.keyCode != 46 && Spry.Widget.Utils.isSpecialKey(e)) { return true; } if (this.keyCode == 8 || this.keyCode == 46 ) { var mr = this.doValidations(this.input.value, this.input.value); if (mr) { return true; } } //DELETE if (this.useCharacterMasking && this.pattern && this.keyCode == 46) { if (e.ctrlKey) { //delete from selection until end this.setValue(this.input.value.substring(0, this.selection.start)); } else if (this.selection.end == this.input.value.length || this.selection.start == this.input.value.length-1){ //allow key if selection is at end (will delete selection) return true; } else { this.flags.operaRevertOnKeyUp = true; } if (Spry.is.mozilla && Spry.is.mac) { this.flags.skp = true; } Spry.Widget.Utils.stopEvent(e); return false; } //BACKSPACE if (this.useCharacterMasking && this.pattern && !e.ctrlKey && this.keyCode == 8) { if (this.selection.start == this.input.value.length) { //delete with BACKSPACE from the end of the input value only var n = this.getAutoComplete(this.selection.start, -1); this.setValue(this.input.value.substring(0, this.input.value.length - (Spry.is.opera?0:1) - n.length)); if (Spry.is.opera) { //cant stop the event on Opera, we'll just preserve the selection so delete will act on it this.selection.start = this.selection.start - 1 - n.length; this.selection.end = this.selection.end - 1 - n.length; } } else if (this.selection.end == this.input.value.length){ //allow BACKSPACE if selection is at end (will delete selection) return true; } else { this.flags.operaRevertOnKeyUp = true; } if (Spry.is.mozilla && Spry.is.mac) { this.flags.skp = true; } Spry.Widget.Utils.stopEvent(e); return false; } return true; }; Spry.Widget.ValidationTextField.prototype.onMouseDown = function(e) { if (this.flags.active) { //mousedown fires before focus //avoid double saveState on first focus by mousedown by checking if the control has focus //do nothing if it's not focused because saveState will be called onfocus this.saveState(); } }; Spry.Widget.ValidationTextField.prototype.onDrop = function(e) { //mark that a drop operation is in progress to avoid race conditions with event handlers for other events //especially onchange and onfocus this.flags.drop = true; this.removeHint(); this.saveState(); this.flags.active = true; this.addClassName(this.element, this.focusClass); this.addClassName(this.additionalError, this.focusClass); }; Spry.Widget.ValidationTextField.prototype.onFocus = function(e) { if (this.flags.drop) { return; } this.removeHint(); if (this.pattern && this.useCharacterMasking) { var autocomplete = this.getAutoComplete(this.selection.start); this.setValue(this.input.value + autocomplete); this.selection.moveTo(this.input.value.length, this.input.value.length); } this.saveState(); this.flags.active = true; this.addClassName(this.element, this.focusClass); this.addClassName(this.additionalError, this.focusClass); }; Spry.Widget.ValidationTextField.prototype.onBlur = function(e) { this.flags.active = false; this.removeClassName(this.element, this.focusClass); this.removeClassName(this.additionalError, this.focusClass); this.flags.restoreSelection = false; var mustRevert = this.doValidations(this.input.value, this.input.value); this.flags.restoreSelection = true; if (this.validateOn & Spry.Widget.ValidationTextField.ONBLUR) { this.validate(); } var self = this; setTimeout(function() {self.putHint();}, 10); return true; }; Spry.Widget.ValidationTextField.prototype.compilePattern = function() { if (!this.pattern) { return; } var compiled = []; var regexps = []; var patternCharacters = []; var idx = 0; var c = '', p = ''; for (var i=0; i<this.pattern.length; i++) { c = this.pattern.charAt(i); if (p == '\\') { if (/[0ABXY\?]/i.test(c)) { regexps[idx - 1] = c; } else { regexps[idx - 1] = Spry.Widget.ValidationTextField.regExpFromChars(c); } compiled[idx - 1] = c; patternCharacters[idx - 1] = null; p = ''; continue; } regexps[idx] = Spry.Widget.ValidationTextField.regExpFromChars(c); if (/[0ABXY\?]/i.test(c)) { compiled[idx] = null; patternCharacters[idx] = c; } else if (c == '\\') { compiled[idx] = c; patternCharacters[idx] = '\\'; } else { compiled[idx] = c; patternCharacters[idx] = null; } idx++; p = c; } this.autoCompleteCharacters = compiled; this.compiledPattern = regexps; this.patternCharacters = patternCharacters; this.patternLength = compiled.length; }; Spry.Widget.ValidationTextField.prototype.getAutoComplete = function(from, direction) { if (direction == -1) { var n = '', m = ''; while(from && (n = this.getAutoComplete(--from) )) { m = n; } return m; } var ret = '', c = ''; for (var i=from; i<this.autoCompleteCharacters.length; i++) { c = this.autoCompleteCharacters[i]; if (c) { ret += c; } else { break; } } return ret; }; Spry.Widget.ValidationTextField.regExpFromChars = function (string) { //string contains pattern characters var ret = '', character = ''; for (var i = 0; i<string.length; i++) { character = string.charAt(i); switch (character) { case '0': ret += '\\d';break; case 'A': ret += '[A-Z]';break; // case 'A': ret += '[\u0041-\u005A\u0061-\u007A\u0100-\u017E\u0180-\u0233\u0391-\u03CE\u0410-\u044F\u05D0-\u05EA\u0621-\u063A\u0641-\u064A\u0661-\u06D3\u06F1-\u06FE]';break; case 'a': ret += '[a-z]';break; // case 'a': ret += '[\u0080-\u00FF]';break; case 'B': case 'b': ret += '[a-zA-Z]';break; case 'x': ret += '[0-9a-z]';break; case 'X': ret += '[0-9A-Z]';break; case 'Y': case 'y': ret += '[0-9a-zA-Z]';break; case '?': ret += '.';break; case '1':case '2':case '3':case '4':case '5':case '6':case '7':case '8':case '9': ret += character; break; case 'c': case 'C': case 'e': case 'E': case 'f': case 'F':case 'r':case 'd': case 'D':case 'n':case 's':case 'S':case 'w':case 'W':case 't':case 'v': ret += character; break; default: ret += '\\' + character; } } return ret; }; Spry.Widget.ValidationTextField.prototype.patternToRegExp = function(len) { var ret = '^'; var end = Math.min(this.compiledPattern.length, len); for (var i=0; i < end; i++) { ret += this.compiledPattern[i]; } ret += '$'; ret = new RegExp(ret, ""); return ret; }; Spry.Widget.ValidationTextField.prototype.resetClasses = function() { var classes = [this.requiredClass, this.invalidFormatClass, this.invalidRangeMinClass, this.invalidRangeMaxClass, this.invalidCharsMinClass, this.invalidCharsMaxClass, this.validClass]; for (var i=0; i < classes.length; i++) { this.removeClassName(this.element, classes[i]); this.removeClassName(this.additionalError, classes[i]); } }; Spry.Widget.ValidationTextField.prototype.reset = function() { this.removeHint(); this.oldValue = this.input.defaultValue; this.resetClasses(); if (Spry.is.ie) { //this will fire the onpropertychange event right after the className changed on the container element //IE6 will not fire the first onpropertychange on an input type text after a onreset handler if inside that handler the className of one of the elements inside the form has been changed //to reproduce: change the className of one of the elements inside the form from within the onreset handler; then the onpropertychange does not fire the first time this.input.forceFireFirstOnPropertyChange = true; this.input.removeAttribute("forceFireFirstOnPropertyChange"); } var self = this; setTimeout(function() {self.putHint();}, 10); }; Spry.Widget.ValidationTextField.prototype.validate = function() { this.resetClasses(); //possible states: required, format, rangeMin, rangeMax, charsMin, charsMax if (this.validateOn & Spry.Widget.ValidationTextField.ONSUBMIT) { this.removeHint(); this.doValidations(this.input.value, this.input.value); if(!this.flags.active) { var self = this; setTimeout(function() {self.putHint();}, 10); } } if (this.isRequired && this.errors & Spry.Widget.ValidationTextField.ERROR_REQUIRED) { this.addClassName(this.element, this.requiredClass); this.addClassName(this.additionalError, this.requiredClass); return false; } if (this.errors & Spry.Widget.ValidationTextField.ERROR_FORMAT) { this.addClassName(this.element, this.invalidFormatClass); this.addClassName(this.additionalError, this.invalidFormatClass); return false; } if (this.errors & Spry.Widget.ValidationTextField.ERROR_RANGE_MIN) { this.addClassName(this.element, this.invalidRangeMinClass); this.addClassName(this.additionalError, this.invalidRangeMinClass); return false; } if (this.errors & Spry.Widget.ValidationTextField.ERROR_RANGE_MAX) { this.addClassName(this.element, this.invalidRangeMaxClass); this.addClassName(this.additionalError, this.invalidRangeMaxClass); return false; } if (this.errors & Spry.Widget.ValidationTextField.ERROR_CHARS_MIN) { this.addClassName(this.element, this.invalidCharsMinClass); this.addClassName(this.additionalError, this.invalidCharsMinClass); return false; } if (this.errors & Spry.Widget.ValidationTextField.ERROR_CHARS_MAX) { this.addClassName(this.element, this.invalidCharsMaxClass); this.addClassName(this.additionalError, this.invalidCharsMaxClass); return false; } this.addClassName(this.element, this.validClass); this.addClassName(this.additionalError, this.validClass); return true; }; Spry.Widget.ValidationTextField.prototype.addClassName = function(ele, className) { if (!ele || !className || (ele.className && ele.className.search(new RegExp("\\b" + className + "\\b")) != -1)) return; ele.className += (ele.className ? " " : "") + className; }; Spry.Widget.ValidationTextField.prototype.removeClassName = function(ele, className) { if (!ele || !className || (ele.className && ele.className.search(new RegExp("\\b" + className + "\\b")) == -1)) return; ele.className = ele.className.replace(new RegExp("\\s*\\b" + className + "\\b", "g"), ""); }; Spry.Widget.ValidationTextField.prototype.showError = function(msg) { alert('Spry.Widget.TextField ERR: ' + msg); }; /** * SelectionDescriptor is a wrapper for input type text selection methods and properties * as implemented by various browsers */ Spry.Widget.SelectionDescriptor = function (element) { this.element = element; this.update(); }; Spry.Widget.SelectionDescriptor.prototype.update = function() { if (Spry.is.ie && Spry.is.windows) { var sel = this.element.ownerDocument.selection; if (this.element.nodeName == "TEXTAREA") { if (sel.type != 'None') { try{var range = sel.createRange();}catch(err){return;} if (range.parentElement() == this.element){ var range_all = this.element.ownerDocument.body.createTextRange(); range_all.moveToElementText(this.element); for (var sel_start = 0; range_all.compareEndPoints('StartToStart', range) < 0; sel_start ++){ range_all.moveStart('character', 1); } this.start = sel_start; // create a selection of the whole this.element range_all = this.element.ownerDocument.body.createTextRange(); range_all.moveToElementText(this.element); for (var sel_end = 0; range_all.compareEndPoints('StartToEnd', range) < 0; sel_end++){ range_all.moveStart('character', 1); } this.end = sel_end; this.length = this.end - this.start; // get selected and surrounding text this.text = range.text; } } } else if (this.element.nodeName == "INPUT"){ try{this.range = sel.createRange();}catch(err){return;} this.length = this.range.text.length; var clone = this.range.duplicate(); this.start = -clone.moveStart("character", -10000); clone = this.range.duplicate(); clone.collapse(false); this.end = -clone.moveStart("character", -10000); this.text = this.range.text; } } else { var tmp = this.element; var selectionStart = 0; var selectionEnd = 0; try { selectionStart = tmp.selectionStart;} catch(err) {} try { selectionEnd = tmp.selectionEnd;} catch(err) {} if (Spry.is.safari) { if (selectionStart == 2147483647) { selectionStart = 0; } if (selectionEnd == 2147483647) { selectionEnd = 0; } } this.start = selectionStart; this.end = selectionEnd; this.length = selectionEnd - selectionStart; this.text = this.element.value.substring(selectionStart, selectionEnd); } }; Spry.Widget.SelectionDescriptor.prototype.destroy = function() { try { delete this.range} catch(err) {} try { delete this.element} catch(err) {} }; Spry.Widget.SelectionDescriptor.prototype.move = function(amount) { if (Spry.is.ie && Spry.is.windows) { this.range.move("character", amount); this.range.select(); } else { try { this.element.selectionStart++;}catch(err) {} } this.update(); }; Spry.Widget.SelectionDescriptor.prototype.moveTo = function(start, end) { if (Spry.is.ie && Spry.is.windows) { if (this.element.nodeName == "TEXTAREA") { var ta_range = this.element.createTextRange(); this.range = this.element.createTextRange(); this.range.move("character", start); this.range.moveEnd("character", end - start); var c1 = this.range.compareEndPoints("StartToStart", ta_range); if (c1 < 0) { this.range.setEndPoint("StartToStart", ta_range); } var c2 = this.range.compareEndPoints("EndToEnd", ta_range); if (c2 > 0) { this.range.setEndPoint("EndToEnd", ta_range); } } else if (this.element.nodeName == "INPUT"){ this.range = this.element.ownerDocument.selection.createRange(); this.range.move("character", -10000); this.start = this.range.moveStart("character", start); this.end = this.start + this.range.moveEnd("character", end - start); } this.range.select(); } else { this.start = start; try { this.element.selectionStart = start;} catch(err) {} this.end = end; try { this.element.selectionEnd = end;} catch(err) {} } this.ignore = true; this.update(); }; Spry.Widget.SelectionDescriptor.prototype.moveEnd = function(amount) { if (Spry.is.ie && Spry.is.windows) { this.range.moveEnd("character", amount); this.range.select(); } else { try { this.element.selectionEnd++;} catch(err) {} } this.update(); }; Spry.Widget.SelectionDescriptor.prototype.collapse = function(begin) { if (Spry.is.ie && Spry.is.windows) { this.range = this.element.ownerDocument.selection.createRange(); this.range.collapse(begin); this.range.select(); } else { if (begin) { try { this.element.selectionEnd = this.element.selectionStart;} catch(err) {} } else { try { this.element.selectionStart = this.element.selectionEnd;} catch(err) {} } } this.update(); }; ////////////////////////////////////////////////////////////////////// // // Spry.Widget.Form - common for all widgets // ////////////////////////////////////////////////////////////////////// if (!Spry.Widget.Form) Spry.Widget.Form = {}; if (!Spry.Widget.Form.onSubmitWidgetQueue) Spry.Widget.Form.onSubmitWidgetQueue = []; if (!Spry.Widget.Form.validate) { Spry.Widget.Form.validate = function(vform) { var isValid = true; var isElementValid = true; var q = Spry.Widget.Form.onSubmitWidgetQueue; var qlen = q.length; for (var i = 0; i < qlen; i++) { if (!q[i].isDisabled() && q[i].form == vform) { isElementValid = q[i].validate(); isValid = isElementValid && isValid; } } return isValid; } }; if (!Spry.Widget.Form.onSubmit) { Spry.Widget.Form.onSubmit = function(e, form) { if (Spry.Widget.Form.validate(form) == false) { return false; } return true; }; }; if (!Spry.Widget.Form.onReset) { Spry.Widget.Form.onReset = function(e, vform) { var q = Spry.Widget.Form.onSubmitWidgetQueue; var qlen = q.length; for (var i = 0; i < qlen; i++) { if (!q[i].isDisabled() && q[i].form == vform && typeof(q[i].reset) == 'function') { q[i].reset(); } } return true; }; }; if (!Spry.Widget.Form.destroy) { Spry.Widget.Form.destroy = function(form) { var q = Spry.Widget.Form.onSubmitWidgetQueue; for (var i = 0; i < Spry.Widget.Form.onSubmitWidgetQueue.length; i++) { if (q[i].form == form && typeof(q[i].destroy) == 'function') { q[i].destroy(); i--; } } } }; if (!Spry.Widget.Form.destroyAll) { Spry.Widget.Form.destroyAll = function() { var q = Spry.Widget.Form.onSubmitWidgetQueue; for (var i = 0; i < Spry.Widget.Form.onSubmitWidgetQueue.length; i++) { if (typeof(q[i].destroy) == 'function') { q[i].destroy(); i--; } } } }; ////////////////////////////////////////////////////////////////////// // // Spry.Widget.Utils // ////////////////////////////////////////////////////////////////////// if (!Spry.Widget.Utils) Spry.Widget.Utils = {}; Spry.Widget.Utils.punycode_constants = { base : 36, tmin : 1, tmax : 26, skew : 38, damp : 700, initial_bias : 72, initial_n : 0x80, delimiter : 0x2D, maxint : 2<<26-1 }; Spry.Widget.Utils.punycode_encode_digit = function (d) { return String.fromCharCode(d + 22 + 75 * (d < 26)); }; Spry.Widget.Utils.punycode_adapt = function (delta, numpoints, firsttime) { delta = firsttime ? delta / this.punycode_constants.damp : delta >> 1; delta += delta / numpoints; for (var k = 0; delta > ((this.punycode_constants.base - this.punycode_constants.tmin) * this.punycode_constants.tmax) / 2; k += this.punycode_constants.base) { delta /= this.punycode_constants.base - this.punycode_constants.tmin; } return k + (this.punycode_constants.base - this.punycode_constants.tmin + 1) * delta / (delta + this.punycode_constants.skew); }; /** * returns a Punicode representation of a UTF-8 string * adapted from http://tools.ietf.org/html/rfc3492 */ Spry.Widget.Utils.punycode_encode = function (input, max_out) { var inputc = input.split(""); input = []; for(var i=0; i<inputc.length; i++) { input.push(inputc[i].charCodeAt(0)); } var output = ''; var h, b, j, m, q, k, t; var input_len = input.length; var n = this.punycode_constants.initial_n; var delta = 0; var bias = this.punycode_constants.initial_bias; var out = 0; for (j = 0; j < input_len; j++) { if (input[j] < 128) { if (max_out - out < 2) { return false; } output += String.fromCharCode(input[j]); out++; } } h = b = out; if (b > 0) { output += String.fromCharCode(this.punycode_constants.delimiter); out++; } while (h < input_len) { for (m = this.punycode_constants.maxint, j = 0; j < input_len; j++) { if (input[j] >= n && input[j] < m) { m = input[j]; } } if (m - n > (this.punycode_constants.maxint - delta) / (h + 1)) { return false; } delta += (m - n) * (h + 1); n = m; for (j = 0; j < input_len; j++) { if (input[j] < n ) { if (++delta == 0) { return false; } } if (input[j] == n) { for (q = delta, k = this.punycode_constants.base; true; k += this.punycode_constants.base) { if (out >= max_out) { return false; } t = k <= bias ? this.punycode_constants.tmin : k >= bias + this.punycode_constants.tmax ? this.punycode_constants.tmax : k - bias; if (q < t) { break; } output += this.punycode_encode_digit(t + (q - t) % (this.punycode_constants.base - t)); out++; q = (q - t) / (this.punycode_constants.base - t); } output += this.punycode_encode_digit(q); out++; bias = this.punycode_adapt(delta, h + 1, h == b); delta = 0; h++; } } delta++, n++; } return output; }; Spry.Widget.Utils.setOptions = function(obj, optionsObj, ignoreUndefinedProps) { if (!optionsObj) return; for (var optionName in optionsObj) { if (ignoreUndefinedProps && optionsObj[optionName] == undefined) continue; obj[optionName] = optionsObj[optionName]; } }; Spry.Widget.Utils.firstValid = function() { var ret = null; for(var i=0; i<Spry.Widget.Utils.firstValid.arguments.length; i++) { if (typeof(Spry.Widget.Utils.firstValid.arguments[i]) != 'undefined') { ret = Spry.Widget.Utils.firstValid.arguments[i]; break; } } return ret; }; Spry.Widget.Utils.specialCharacters = ",8,9,16,17,18,20,27,33,34,35,36,37,38,40,45,144,192,63232,"; Spry.Widget.Utils.specialSafariNavKeys = "63232,63233,63234,63235,63272,63273,63275,63276,63277,63289,"; Spry.Widget.Utils.specialNotSafariCharacters = "39,46,91,92,93,"; Spry.Widget.Utils.specialCharacters += Spry.Widget.Utils.specialSafariNavKeys; if (!Spry.is.safari) { Spry.Widget.Utils.specialCharacters += Spry.Widget.Utils.specialNotSafariCharacters; } Spry.Widget.Utils.isSpecialKey = function (ev) { return Spry.Widget.Utils.specialCharacters.indexOf("," + ev.keyCode + ",") != -1; }; Spry.Widget.Utils.getCharacterFromEvent = function(e){ var keyDown = e.type == "keydown"; var code = null; var character = null; if(Spry.is.mozilla && !keyDown){ if(e.charCode){ character = String.fromCharCode(e.charCode); } else { code = e.keyCode; } } else { code = e.keyCode || e.which; if (code != 13) { character = String.fromCharCode(code); } } if (Spry.is.safari) { if (keyDown) { code = e.keyCode || e.which; character = String.fromCharCode(code); } else { code = e.keyCode || e.which; if (Spry.Widget.Utils.specialCharacters.indexOf("," + code + ",") != -1) { character = null; } else { character = String.fromCharCode(code); } } } if(Spry.is.opera) { if (Spry.Widget.Utils.specialCharacters.indexOf("," + code + ",") != -1) { character = null; } else { character = String.fromCharCode(code); } } return character; }; Spry.Widget.Utils.getFirstChildWithNodeNameAtAnyLevel = function(node, nodeName) { var elements = node.getElementsByTagName(nodeName); if (elements) { return elements[0]; } return null; }; Spry.Widget.Utils.getFirstParentWithNodeName = function(node, nodeName) { while (node.parentNode && node.parentNode.nodeName.toLowerCase() != nodeName.toLowerCase() && node.parentNode.nodeName != 'BODY') { node = node.parentNode; } if (node.parentNode && node.parentNode.nodeName.toLowerCase() == nodeName.toLowerCase()) { return node.parentNode; } else { return null; } }; Spry.Widget.Utils.destroyWidgets = function (container) { if (typeof container == 'string') { container = document.getElementById(container); } var q = Spry.Widget.Form.onSubmitWidgetQueue; for (var i = 0; i < Spry.Widget.Form.onSubmitWidgetQueue.length; i++) { if (typeof(q[i].destroy) == 'function' && Spry.Widget.Utils.contains(container, q[i].element)) { q[i].destroy(); i--; } } }; Spry.Widget.Utils.contains = function (who, what) { if (typeof who.contains == 'object') { return what && who && (who == what || who.contains(what)); } else { var el = what; while(el) { if (el == who) { return true; } el = el.parentNode; } return false; } }; Spry.Widget.Utils.addEventListener = function(element, eventType, handler, capture) { try { if (element.addEventListener) element.addEventListener(eventType, handler, capture); else if (element.attachEvent) element.attachEvent("on" + eventType, handler, capture); } catch (e) {} }; Spry.Widget.Utils.removeEventListener = function(element, eventType, handler, capture) { try { if (element.removeEventListener) element.removeEventListener(eventType, handler, capture); else if (element.detachEvent) element.detachEvent("on" + eventType, handler, capture); } catch (e) {} }; Spry.Widget.Utils.stopEvent = function(ev) { try { this.stopPropagation(ev); this.preventDefault(ev); } catch (e) {} }; /** * Stops event propagation * @param {Event} ev the event */ Spry.Widget.Utils.stopPropagation = function(ev) { if (ev.stopPropagation) { ev.stopPropagation(); } else { ev.cancelBubble = true; } }; /** * Prevents the default behavior of the event * @param {Event} ev the event */ Spry.Widget.Utils.preventDefault = function(ev) { if (ev.preventDefault) { ev.preventDefault(); } else { ev.returnValue = false; } };
JavaScript
var ertekelo = { init : function(){ }//ertekelo.init }//ertekelo document.observe('dom:loaded', function(){ ertekelo.init(); });
JavaScript
// script.aculo.us unittest.js v1.9.0, Thu Dec 23 16:54:48 -0500 2010 // Copyright (c) 2005-2010 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us) // (c) 2005-2010 Jon Tirsen (http://www.tirsen.com) // (c) 2005-2010 Michael Schuerig (http://www.schuerig.de/michael/) // // script.aculo.us is freely distributable under the terms of an MIT-style license. // For details, see the script.aculo.us web site: http://script.aculo.us/ // experimental, Firefox-only Event.simulateMouse = function(element, eventName) { var options = Object.extend({ pointerX: 0, pointerY: 0, buttons: 0, ctrlKey: false, altKey: false, shiftKey: false, metaKey: false }, arguments[2] || {}); var oEvent = document.createEvent("MouseEvents"); oEvent.initMouseEvent(eventName, true, true, document.defaultView, options.buttons, options.pointerX, options.pointerY, options.pointerX, options.pointerY, options.ctrlKey, options.altKey, options.shiftKey, options.metaKey, 0, $(element)); if(this.mark) Element.remove(this.mark); this.mark = document.createElement('div'); this.mark.appendChild(document.createTextNode(" ")); document.body.appendChild(this.mark); this.mark.style.position = 'absolute'; this.mark.style.top = options.pointerY + "px"; this.mark.style.left = options.pointerX + "px"; this.mark.style.width = "5px"; this.mark.style.height = "5px;"; this.mark.style.borderTop = "1px solid red;"; this.mark.style.borderLeft = "1px solid red;"; if(this.step) alert('['+new Date().getTime().toString()+'] '+eventName+'/'+Test.Unit.inspect(options)); $(element).dispatchEvent(oEvent); }; // Note: Due to a fix in Firefox 1.0.5/6 that probably fixed "too much", this doesn't work in 1.0.6 or DP2. // You need to downgrade to 1.0.4 for now to get this working // See https://bugzilla.mozilla.org/show_bug.cgi?id=289940 for the fix that fixed too much Event.simulateKey = function(element, eventName) { var options = Object.extend({ ctrlKey: false, altKey: false, shiftKey: false, metaKey: false, keyCode: 0, charCode: 0 }, arguments[2] || {}); var oEvent = document.createEvent("KeyEvents"); oEvent.initKeyEvent(eventName, true, true, window, options.ctrlKey, options.altKey, options.shiftKey, options.metaKey, options.keyCode, options.charCode ); $(element).dispatchEvent(oEvent); }; Event.simulateKeys = function(element, command) { for(var i=0; i<command.length; i++) { Event.simulateKey(element,'keypress',{charCode:command.charCodeAt(i)}); } }; var Test = {}; Test.Unit = {}; // security exception workaround Test.Unit.inspect = Object.inspect; Test.Unit.Logger = Class.create(); Test.Unit.Logger.prototype = { initialize: function(log) { this.log = $(log); if (this.log) { this._createLogTable(); } }, start: function(testName) { if (!this.log) return; this.testName = testName; this.lastLogLine = document.createElement('tr'); this.statusCell = document.createElement('td'); this.nameCell = document.createElement('td'); this.nameCell.className = "nameCell"; this.nameCell.appendChild(document.createTextNode(testName)); this.messageCell = document.createElement('td'); this.lastLogLine.appendChild(this.statusCell); this.lastLogLine.appendChild(this.nameCell); this.lastLogLine.appendChild(this.messageCell); this.loglines.appendChild(this.lastLogLine); }, finish: function(status, summary) { if (!this.log) return; this.lastLogLine.className = status; this.statusCell.innerHTML = status; this.messageCell.innerHTML = this._toHTML(summary); this.addLinksToResults(); }, message: function(message) { if (!this.log) return; this.messageCell.innerHTML = this._toHTML(message); }, summary: function(summary) { if (!this.log) return; this.logsummary.innerHTML = this._toHTML(summary); }, _createLogTable: function() { this.log.innerHTML = '<div id="logsummary"></div>' + '<table id="logtable">' + '<thead><tr><th>Status</th><th>Test</th><th>Message</th></tr></thead>' + '<tbody id="loglines"></tbody>' + '</table>'; this.logsummary = $('logsummary'); this.loglines = $('loglines'); }, _toHTML: function(txt) { return txt.escapeHTML().replace(/\n/g,"<br/>"); }, addLinksToResults: function(){ $$("tr.failed .nameCell").each( function(td){ // todo: limit to children of this.log td.title = "Run only this test"; Event.observe(td, 'click', function(){ window.location.search = "?tests=" + td.innerHTML;}); }); $$("tr.passed .nameCell").each( function(td){ // todo: limit to children of this.log td.title = "Run all tests"; Event.observe(td, 'click', function(){ window.location.search = "";}); }); } }; Test.Unit.Runner = Class.create(); Test.Unit.Runner.prototype = { initialize: function(testcases) { this.options = Object.extend({ testLog: 'testlog' }, arguments[1] || {}); this.options.resultsURL = this.parseResultsURLQueryParameter(); this.options.tests = this.parseTestsQueryParameter(); if (this.options.testLog) { this.options.testLog = $(this.options.testLog) || null; } if(this.options.tests) { this.tests = []; for(var i = 0; i < this.options.tests.length; i++) { if(/^test/.test(this.options.tests[i])) { this.tests.push(new Test.Unit.Testcase(this.options.tests[i], testcases[this.options.tests[i]], testcases["setup"], testcases["teardown"])); } } } else { if (this.options.test) { this.tests = [new Test.Unit.Testcase(this.options.test, testcases[this.options.test], testcases["setup"], testcases["teardown"])]; } else { this.tests = []; for(var testcase in testcases) { if(/^test/.test(testcase)) { this.tests.push( new Test.Unit.Testcase( this.options.context ? ' -> ' + this.options.titles[testcase] : testcase, testcases[testcase], testcases["setup"], testcases["teardown"] )); } } } } this.currentTest = 0; this.logger = new Test.Unit.Logger(this.options.testLog); setTimeout(this.runTests.bind(this), 1000); }, parseResultsURLQueryParameter: function() { return window.location.search.parseQuery()["resultsURL"]; }, parseTestsQueryParameter: function(){ if (window.location.search.parseQuery()["tests"]){ return window.location.search.parseQuery()["tests"].split(','); }; }, // Returns: // "ERROR" if there was an error, // "FAILURE" if there was a failure, or // "SUCCESS" if there was neither getResult: function() { var hasFailure = false; for(var i=0;i<this.tests.length;i++) { if (this.tests[i].errors > 0) { return "ERROR"; } if (this.tests[i].failures > 0) { hasFailure = true; } } if (hasFailure) { return "FAILURE"; } else { return "SUCCESS"; } }, postResults: function() { if (this.options.resultsURL) { new Ajax.Request(this.options.resultsURL, { method: 'get', parameters: 'result=' + this.getResult(), asynchronous: false }); } }, runTests: function() { var test = this.tests[this.currentTest]; if (!test) { // finished! this.postResults(); this.logger.summary(this.summary()); return; } if(!test.isWaiting) { this.logger.start(test.name); } test.run(); if(test.isWaiting) { this.logger.message("Waiting for " + test.timeToWait + "ms"); setTimeout(this.runTests.bind(this), test.timeToWait || 1000); } else { this.logger.finish(test.status(), test.summary()); this.currentTest++; // tail recursive, hopefully the browser will skip the stackframe this.runTests(); } }, summary: function() { var assertions = 0; var failures = 0; var errors = 0; var messages = []; for(var i=0;i<this.tests.length;i++) { assertions += this.tests[i].assertions; failures += this.tests[i].failures; errors += this.tests[i].errors; } return ( (this.options.context ? this.options.context + ': ': '') + this.tests.length + " tests, " + assertions + " assertions, " + failures + " failures, " + errors + " errors"); } }; Test.Unit.Assertions = Class.create(); Test.Unit.Assertions.prototype = { initialize: function() { this.assertions = 0; this.failures = 0; this.errors = 0; this.messages = []; }, summary: function() { return ( this.assertions + " assertions, " + this.failures + " failures, " + this.errors + " errors" + "\n" + this.messages.join("\n")); }, pass: function() { this.assertions++; }, fail: function(message) { this.failures++; this.messages.push("Failure: " + message); }, info: function(message) { this.messages.push("Info: " + message); }, error: function(error) { this.errors++; this.messages.push(error.name + ": "+ error.message + "(" + Test.Unit.inspect(error) +")"); }, status: function() { if (this.failures > 0) return 'failed'; if (this.errors > 0) return 'error'; return 'passed'; }, assert: function(expression) { var message = arguments[1] || 'assert: got "' + Test.Unit.inspect(expression) + '"'; try { expression ? this.pass() : this.fail(message); } catch(e) { this.error(e); } }, assertEqual: function(expected, actual) { var message = arguments[2] || "assertEqual"; try { (expected == actual) ? this.pass() : this.fail(message + ': expected "' + Test.Unit.inspect(expected) + '", actual "' + Test.Unit.inspect(actual) + '"'); } catch(e) { this.error(e); } }, assertInspect: function(expected, actual) { var message = arguments[2] || "assertInspect"; try { (expected == actual.inspect()) ? this.pass() : this.fail(message + ': expected "' + Test.Unit.inspect(expected) + '", actual "' + Test.Unit.inspect(actual) + '"'); } catch(e) { this.error(e); } }, assertEnumEqual: function(expected, actual) { var message = arguments[2] || "assertEnumEqual"; try { $A(expected).length == $A(actual).length && expected.zip(actual).all(function(pair) { return pair[0] == pair[1] }) ? this.pass() : this.fail(message + ': expected ' + Test.Unit.inspect(expected) + ', actual ' + Test.Unit.inspect(actual)); } catch(e) { this.error(e); } }, assertNotEqual: function(expected, actual) { var message = arguments[2] || "assertNotEqual"; try { (expected != actual) ? this.pass() : this.fail(message + ': got "' + Test.Unit.inspect(actual) + '"'); } catch(e) { this.error(e); } }, assertIdentical: function(expected, actual) { var message = arguments[2] || "assertIdentical"; try { (expected === actual) ? this.pass() : this.fail(message + ': expected "' + Test.Unit.inspect(expected) + '", actual "' + Test.Unit.inspect(actual) + '"'); } catch(e) { this.error(e); } }, assertNotIdentical: function(expected, actual) { var message = arguments[2] || "assertNotIdentical"; try { !(expected === actual) ? this.pass() : this.fail(message + ': expected "' + Test.Unit.inspect(expected) + '", actual "' + Test.Unit.inspect(actual) + '"'); } catch(e) { this.error(e); } }, assertNull: function(obj) { var message = arguments[1] || 'assertNull'; try { (obj==null) ? this.pass() : this.fail(message + ': got "' + Test.Unit.inspect(obj) + '"'); } catch(e) { this.error(e); } }, assertMatch: function(expected, actual) { var message = arguments[2] || 'assertMatch'; var regex = new RegExp(expected); try { (regex.exec(actual)) ? this.pass() : this.fail(message + ' : regex: "' + Test.Unit.inspect(expected) + ' did not match: ' + Test.Unit.inspect(actual) + '"'); } catch(e) { this.error(e); } }, assertHidden: function(element) { var message = arguments[1] || 'assertHidden'; this.assertEqual("none", element.style.display, message); }, assertNotNull: function(object) { var message = arguments[1] || 'assertNotNull'; this.assert(object != null, message); }, assertType: function(expected, actual) { var message = arguments[2] || 'assertType'; try { (actual.constructor == expected) ? this.pass() : this.fail(message + ': expected "' + Test.Unit.inspect(expected) + '", actual "' + (actual.constructor) + '"'); } catch(e) { this.error(e); } }, assertNotOfType: function(expected, actual) { var message = arguments[2] || 'assertNotOfType'; try { (actual.constructor != expected) ? this.pass() : this.fail(message + ': expected "' + Test.Unit.inspect(expected) + '", actual "' + (actual.constructor) + '"'); } catch(e) { this.error(e); } }, assertInstanceOf: function(expected, actual) { var message = arguments[2] || 'assertInstanceOf'; try { (actual instanceof expected) ? this.pass() : this.fail(message + ": object was not an instance of the expected type"); } catch(e) { this.error(e); } }, assertNotInstanceOf: function(expected, actual) { var message = arguments[2] || 'assertNotInstanceOf'; try { !(actual instanceof expected) ? this.pass() : this.fail(message + ": object was an instance of the not expected type"); } catch(e) { this.error(e); } }, assertRespondsTo: function(method, obj) { var message = arguments[2] || 'assertRespondsTo'; try { (obj[method] && typeof obj[method] == 'function') ? this.pass() : this.fail(message + ": object doesn't respond to [" + method + "]"); } catch(e) { this.error(e); } }, assertReturnsTrue: function(method, obj) { var message = arguments[2] || 'assertReturnsTrue'; try { var m = obj[method]; if(!m) m = obj['is'+method.charAt(0).toUpperCase()+method.slice(1)]; m() ? this.pass() : this.fail(message + ": method returned false"); } catch(e) { this.error(e); } }, assertReturnsFalse: function(method, obj) { var message = arguments[2] || 'assertReturnsFalse'; try { var m = obj[method]; if(!m) m = obj['is'+method.charAt(0).toUpperCase()+method.slice(1)]; !m() ? this.pass() : this.fail(message + ": method returned true"); } catch(e) { this.error(e); } }, assertRaise: function(exceptionName, method) { var message = arguments[2] || 'assertRaise'; try { method(); this.fail(message + ": exception expected but none was raised"); } catch(e) { ((exceptionName == null) || (e.name==exceptionName)) ? this.pass() : this.error(e); } }, assertElementsMatch: function() { var expressions = $A(arguments), elements = $A(expressions.shift()); if (elements.length != expressions.length) { this.fail('assertElementsMatch: size mismatch: ' + elements.length + ' elements, ' + expressions.length + ' expressions'); return false; } elements.zip(expressions).all(function(pair, index) { var element = $(pair.first()), expression = pair.last(); if (element.match(expression)) return true; this.fail('assertElementsMatch: (in index ' + index + ') expected ' + expression.inspect() + ' but got ' + element.inspect()); }.bind(this)) && this.pass(); }, assertElementMatches: function(element, expression) { this.assertElementsMatch([element], expression); }, benchmark: function(operation, iterations) { var startAt = new Date(); (iterations || 1).times(operation); var timeTaken = ((new Date())-startAt); this.info((arguments[2] || 'Operation') + ' finished ' + iterations + ' iterations in ' + (timeTaken/1000)+'s' ); return timeTaken; }, _isVisible: function(element) { element = $(element); if(!element.parentNode) return true; this.assertNotNull(element); if(element.style && Element.getStyle(element, 'display') == 'none') return false; return this._isVisible(element.parentNode); }, assertNotVisible: function(element) { this.assert(!this._isVisible(element), Test.Unit.inspect(element) + " was not hidden and didn't have a hidden parent either. " + ("" || arguments[1])); }, assertVisible: function(element) { this.assert(this._isVisible(element), Test.Unit.inspect(element) + " was not visible. " + ("" || arguments[1])); }, benchmark: function(operation, iterations) { var startAt = new Date(); (iterations || 1).times(operation); var timeTaken = ((new Date())-startAt); this.info((arguments[2] || 'Operation') + ' finished ' + iterations + ' iterations in ' + (timeTaken/1000)+'s' ); return timeTaken; } }; Test.Unit.Testcase = Class.create(); Object.extend(Object.extend(Test.Unit.Testcase.prototype, Test.Unit.Assertions.prototype), { initialize: function(name, test, setup, teardown) { Test.Unit.Assertions.prototype.initialize.bind(this)(); this.name = name; if(typeof test == 'string') { test = test.gsub(/(\.should[^\(]+\()/,'#{0}this,'); test = test.gsub(/(\.should[^\(]+)\(this,\)/,'#{1}(this)'); this.test = function() { eval('with(this){'+test+'}'); } } else { this.test = test || function() {}; } this.setup = setup || function() {}; this.teardown = teardown || function() {}; this.isWaiting = false; this.timeToWait = 1000; }, wait: function(time, nextPart) { this.isWaiting = true; this.test = nextPart; this.timeToWait = time; }, run: function() { try { try { if (!this.isWaiting) this.setup.bind(this)(); this.isWaiting = false; this.test.bind(this)(); } finally { if(!this.isWaiting) { this.teardown.bind(this)(); } } } catch(e) { this.error(e); } } }); // *EXPERIMENTAL* BDD-style testing to please non-technical folk // This draws many ideas from RSpec http://rspec.rubyforge.org/ Test.setupBDDExtensionMethods = function(){ var METHODMAP = { shouldEqual: 'assertEqual', shouldNotEqual: 'assertNotEqual', shouldEqualEnum: 'assertEnumEqual', shouldBeA: 'assertType', shouldNotBeA: 'assertNotOfType', shouldBeAn: 'assertType', shouldNotBeAn: 'assertNotOfType', shouldBeNull: 'assertNull', shouldNotBeNull: 'assertNotNull', shouldBe: 'assertReturnsTrue', shouldNotBe: 'assertReturnsFalse', shouldRespondTo: 'assertRespondsTo' }; var makeAssertion = function(assertion, args, object) { this[assertion].apply(this,(args || []).concat([object])); }; Test.BDDMethods = {}; $H(METHODMAP).each(function(pair) { Test.BDDMethods[pair.key] = function() { var args = $A(arguments); var scope = args.shift(); makeAssertion.apply(scope, [pair.value, args, this]); }; }); [Array.prototype, String.prototype, Number.prototype, Boolean.prototype].each( function(p){ Object.extend(p, Test.BDDMethods) } ); }; Test.context = function(name, spec, log){ Test.setupBDDExtensionMethods(); var compiledSpec = {}; var titles = {}; for(specName in spec) { switch(specName){ case "setup": case "teardown": compiledSpec[specName] = spec[specName]; break; default: var testName = 'test'+specName.gsub(/\s+/,'-').camelize(); var body = spec[specName].toString().split('\n').slice(1); if(/^\{/.test(body[0])) body = body.slice(1); body.pop(); body = body.map(function(statement){ return statement.strip() }); compiledSpec[testName] = body.join('\n'); titles[testName] = specName; } } new Test.Unit.Runner(compiledSpec, { titles: titles, testLog: log || 'testlog', context: name }); };
JavaScript
// script.aculo.us slider.js v1.9.0, Thu Dec 23 16:54:48 -0500 2010 // Copyright (c) 2005-2010 Marty Haught, Thomas Fuchs // // script.aculo.us is freely distributable under the terms of an MIT-style license. // For details, see the script.aculo.us web site: http://script.aculo.us/ if (!Control) var Control = { }; // options: // axis: 'vertical', or 'horizontal' (default) // // callbacks: // onChange(value) // onSlide(value) Control.Slider = Class.create({ initialize: function(handle, track, options) { var slider = this; if (Object.isArray(handle)) { this.handles = handle.collect( function(e) { return $(e) }); } else { this.handles = [$(handle)]; } this.track = $(track); this.options = options || { }; this.axis = this.options.axis || 'horizontal'; this.increment = this.options.increment || 1; this.step = parseInt(this.options.step || '1'); this.range = this.options.range || $R(0,1); this.value = 0; // assure backwards compat this.values = this.handles.map( function() { return 0 }); this.spans = this.options.spans ? this.options.spans.map(function(s){ return $(s) }) : false; this.options.startSpan = $(this.options.startSpan || null); this.options.endSpan = $(this.options.endSpan || null); this.restricted = this.options.restricted || false; this.maximum = this.options.maximum || this.range.end; this.minimum = this.options.minimum || this.range.start; // Will be used to align the handle onto the track, if necessary this.alignX = parseInt(this.options.alignX || '0'); this.alignY = parseInt(this.options.alignY || '0'); this.trackLength = this.maximumOffset() - this.minimumOffset(); this.handleLength = this.isVertical() ? (this.handles[0].offsetHeight != 0 ? this.handles[0].offsetHeight : this.handles[0].style.height.replace(/px$/,"")) : (this.handles[0].offsetWidth != 0 ? this.handles[0].offsetWidth : this.handles[0].style.width.replace(/px$/,"")); this.active = false; this.dragging = false; this.disabled = false; if (this.options.disabled) this.setDisabled(); // Allowed values array this.allowedValues = this.options.values ? this.options.values.sortBy(Prototype.K) : false; if (this.allowedValues) { this.minimum = this.allowedValues.min(); this.maximum = this.allowedValues.max(); } this.eventMouseDown = this.startDrag.bindAsEventListener(this); this.eventMouseUp = this.endDrag.bindAsEventListener(this); this.eventMouseMove = this.update.bindAsEventListener(this); // Initialize handles in reverse (make sure first handle is active) this.handles.each( function(h,i) { i = slider.handles.length-1-i; slider.setValue(parseFloat( (Object.isArray(slider.options.sliderValue) ? slider.options.sliderValue[i] : slider.options.sliderValue) || slider.range.start), i); h.makePositioned().observe("mousedown", slider.eventMouseDown); }); this.track.observe("mousedown", this.eventMouseDown); document.observe("mouseup", this.eventMouseUp); document.observe("mousemove", this.eventMouseMove); this.initialized = true; }, dispose: function() { var slider = this; Event.stopObserving(this.track, "mousedown", this.eventMouseDown); Event.stopObserving(document, "mouseup", this.eventMouseUp); Event.stopObserving(document, "mousemove", this.eventMouseMove); this.handles.each( function(h) { Event.stopObserving(h, "mousedown", slider.eventMouseDown); }); }, setDisabled: function(){ this.disabled = true; }, setEnabled: function(){ this.disabled = false; }, getNearestValue: function(value){ if (this.allowedValues){ if (value >= this.allowedValues.max()) return(this.allowedValues.max()); if (value <= this.allowedValues.min()) return(this.allowedValues.min()); var offset = Math.abs(this.allowedValues[0] - value); var newValue = this.allowedValues[0]; this.allowedValues.each( function(v) { var currentOffset = Math.abs(v - value); if (currentOffset <= offset){ newValue = v; offset = currentOffset; } }); return newValue; } if (value > this.range.end) return this.range.end; if (value < this.range.start) return this.range.start; return value; }, setValue: function(sliderValue, handleIdx){ if (!this.active) { this.activeHandleIdx = handleIdx || 0; this.activeHandle = this.handles[this.activeHandleIdx]; this.updateStyles(); } handleIdx = handleIdx || this.activeHandleIdx || 0; if (this.initialized && this.restricted) { if ((handleIdx>0) && (sliderValue<this.values[handleIdx-1])) sliderValue = this.values[handleIdx-1]; if ((handleIdx < (this.handles.length-1)) && (sliderValue>this.values[handleIdx+1])) sliderValue = this.values[handleIdx+1]; } sliderValue = this.getNearestValue(sliderValue); this.values[handleIdx] = sliderValue; this.value = this.values[0]; // assure backwards compat this.handles[handleIdx].style[this.isVertical() ? 'top' : 'left'] = this.translateToPx(sliderValue); this.drawSpans(); if (!this.dragging || !this.event) this.updateFinished(); }, setValueBy: function(delta, handleIdx) { this.setValue(this.values[handleIdx || this.activeHandleIdx || 0] + delta, handleIdx || this.activeHandleIdx || 0); }, translateToPx: function(value) { return Math.round( ((this.trackLength-this.handleLength)/(this.range.end-this.range.start)) * (value - this.range.start)) + "px"; }, translateToValue: function(offset) { return ((offset/(this.trackLength-this.handleLength) * (this.range.end-this.range.start)) + this.range.start); }, getRange: function(range) { var v = this.values.sortBy(Prototype.K); range = range || 0; return $R(v[range],v[range+1]); }, minimumOffset: function(){ return(this.isVertical() ? this.alignY : this.alignX); }, maximumOffset: function(){ return(this.isVertical() ? (this.track.offsetHeight != 0 ? this.track.offsetHeight : this.track.style.height.replace(/px$/,"")) - this.alignY : (this.track.offsetWidth != 0 ? this.track.offsetWidth : this.track.style.width.replace(/px$/,"")) - this.alignX); }, isVertical: function(){ return (this.axis == 'vertical'); }, drawSpans: function() { var slider = this; if (this.spans) $R(0, this.spans.length-1).each(function(r) { slider.setSpan(slider.spans[r], slider.getRange(r)) }); if (this.options.startSpan) this.setSpan(this.options.startSpan, $R(0, this.values.length>1 ? this.getRange(0).min() : this.value )); if (this.options.endSpan) this.setSpan(this.options.endSpan, $R(this.values.length>1 ? this.getRange(this.spans.length-1).max() : this.value, this.maximum)); }, setSpan: function(span, range) { if (this.isVertical()) { span.style.top = this.translateToPx(range.start); span.style.height = this.translateToPx(range.end - range.start + this.range.start); } else { span.style.left = this.translateToPx(range.start); span.style.width = this.translateToPx(range.end - range.start + this.range.start); } }, updateStyles: function() { this.handles.each( function(h){ Element.removeClassName(h, 'selected') }); Element.addClassName(this.activeHandle, 'selected'); }, startDrag: function(event) { if (Event.isLeftClick(event)) { if (!this.disabled){ this.active = true; var handle = Event.element(event); var pointer = [Event.pointerX(event), Event.pointerY(event)]; var track = handle; if (track==this.track) { var offsets = this.track.cumulativeOffset(); this.event = event; this.setValue(this.translateToValue( (this.isVertical() ? pointer[1]-offsets[1] : pointer[0]-offsets[0])-(this.handleLength/2) )); var offsets = this.activeHandle.cumulativeOffset(); this.offsetX = (pointer[0] - offsets[0]); this.offsetY = (pointer[1] - offsets[1]); } else { // find the handle (prevents issues with Safari) while((this.handles.indexOf(handle) == -1) && handle.parentNode) handle = handle.parentNode; if (this.handles.indexOf(handle)!=-1) { this.activeHandle = handle; this.activeHandleIdx = this.handles.indexOf(this.activeHandle); this.updateStyles(); var offsets = this.activeHandle.cumulativeOffset(); this.offsetX = (pointer[0] - offsets[0]); this.offsetY = (pointer[1] - offsets[1]); } } } Event.stop(event); } }, update: function(event) { if (this.active) { if (!this.dragging) this.dragging = true; this.draw(event); if (Prototype.Browser.WebKit) window.scrollBy(0,0); Event.stop(event); } }, draw: function(event) { var pointer = [Event.pointerX(event), Event.pointerY(event)]; var offsets = this.track.cumulativeOffset(); pointer[0] -= this.offsetX + offsets[0]; pointer[1] -= this.offsetY + offsets[1]; this.event = event; this.setValue(this.translateToValue( this.isVertical() ? pointer[1] : pointer[0] )); if (this.initialized && this.options.onSlide) this.options.onSlide(this.values.length>1 ? this.values : this.value, this); }, endDrag: function(event) { if (this.active && this.dragging) { this.finishDrag(event, true); Event.stop(event); } this.active = false; this.dragging = false; }, finishDrag: function(event, success) { this.active = false; this.dragging = false; this.updateFinished(); }, updateFinished: function() { if (this.initialized && this.options.onChange) this.options.onChange(this.values.length>1 ? this.values : this.value, this); this.event = null; } });
JavaScript
// script.aculo.us sound.js v1.9.0, Thu Dec 23 16:54:48 -0500 2010 // Copyright (c) 2005-2010 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us) // // Based on code created by Jules Gravinese (http://www.webveteran.com/) // // script.aculo.us is freely distributable under the terms of an MIT-style license. // For details, see the script.aculo.us web site: http://script.aculo.us/ Sound = { tracks: {}, _enabled: true, template: new Template('<embed style="height:0" id="sound_#{track}_#{id}" src="#{url}" loop="false" autostart="true" hidden="true"/>'), enable: function(){ Sound._enabled = true; }, disable: function(){ Sound._enabled = false; }, play: function(url){ if(!Sound._enabled) return; var options = Object.extend({ track: 'global', url: url, replace: false }, arguments[1] || {}); if(options.replace && this.tracks[options.track]) { $R(0, this.tracks[options.track].id).each(function(id){ var sound = $('sound_'+options.track+'_'+id); sound.Stop && sound.Stop(); sound.remove(); }); this.tracks[options.track] = null; } if(!this.tracks[options.track]) this.tracks[options.track] = { id: 0 }; else this.tracks[options.track].id++; options.id = this.tracks[options.track].id; $$('body')[0].insert( Prototype.Browser.IE ? new Element('bgsound',{ id: 'sound_'+options.track+'_'+options.id, src: options.url, loop: 1, autostart: true }) : Sound.template.evaluate(options)); } }; if(Prototype.Browser.Gecko && navigator.userAgent.indexOf("Win") > 0){ if(navigator.plugins && $A(navigator.plugins).detect(function(p){ return p.name.indexOf('QuickTime') != -1 })) Sound.template = new Template('<object id="sound_#{track}_#{id}" width="0" height="0" type="audio/mpeg" data="#{url}"/>'); else if(navigator.plugins && $A(navigator.plugins).detect(function(p){ return p.name.indexOf('Windows Media') != -1 })) Sound.template = new Template('<object id="sound_#{track}_#{id}" type="application/x-mplayer2" data="#{url}"></object>'); else if(navigator.plugins && $A(navigator.plugins).detect(function(p){ return p.name.indexOf('RealPlayer') != -1 })) Sound.template = new Template('<embed type="audio/x-pn-realaudio-plugin" style="height:0" id="sound_#{track}_#{id}" src="#{url}" loop="false" autostart="true" hidden="true"/>'); else Sound.play = function(){}; }
JavaScript
// script.aculo.us scriptaculous.js v1.9.0, Thu Dec 23 16:54:48 -0500 2010 // Copyright (c) 2005-2010 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us) // // Permission is hereby granted, free of charge, to any person obtaining // a copy of this software and associated documentation files (the // "Software"), to deal in the Software without restriction, including // without limitation the rights to use, copy, modify, merge, publish, // distribute, sublicense, and/or sell copies of the Software, and to // permit persons to whom the Software is furnished to do so, subject to // the following conditions: // // The above copyright notice and this permission notice shall be // included in all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // // For details, see the script.aculo.us web site: http://script.aculo.us/ var Scriptaculous = { Version: '1.9.0', require: function(libraryName) { try{ // inserting via DOM fails in Safari 2.0, so brute force approach document.write('<script type="text/javascript" src="'+libraryName+'"><\/script>'); } catch(e) { // for xhtml+xml served content, fall back to DOM methods var script = document.createElement('script'); script.type = 'text/javascript'; script.src = libraryName; document.getElementsByTagName('head')[0].appendChild(script); } }, REQUIRED_PROTOTYPE: '1.6.0.3', load: function() { function convertVersionString(versionString) { var v = versionString.replace(/_.*|\./g, ''); v = parseInt(v + '0'.times(4-v.length)); return versionString.indexOf('_') > -1 ? v-1 : v; } if((typeof Prototype=='undefined') || (typeof Element == 'undefined') || (typeof Element.Methods=='undefined') || (convertVersionString(Prototype.Version) < convertVersionString(Scriptaculous.REQUIRED_PROTOTYPE))) throw("script.aculo.us requires the Prototype JavaScript framework >= " + Scriptaculous.REQUIRED_PROTOTYPE); var js = /scriptaculous\.js(\?.*)?$/; $$('script[src]').findAll(function(s) { return s.src.match(js); }).each(function(s) { var path = s.src.replace(js, ''), includes = s.src.match(/\?.*load=([a-z,]*)/); (includes ? includes[1] : 'builder,effects,dragdrop,controls,slider,sound').split(',').each( function(include) { Scriptaculous.require(path+include+'.js') }); }); } }; Scriptaculous.load();
JavaScript
// script.aculo.us builder.js v1.9.0, Thu Dec 23 16:54:48 -0500 2010 // Copyright (c) 2005-2010 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us) // // script.aculo.us is freely distributable under the terms of an MIT-style license. // For details, see the script.aculo.us web site: http://script.aculo.us/ var Builder = { NODEMAP: { AREA: 'map', CAPTION: 'table', COL: 'table', COLGROUP: 'table', LEGEND: 'fieldset', OPTGROUP: 'select', OPTION: 'select', PARAM: 'object', TBODY: 'table', TD: 'table', TFOOT: 'table', TH: 'table', THEAD: 'table', TR: 'table' }, // note: For Firefox < 1.5, OPTION and OPTGROUP tags are currently broken, // due to a Firefox bug node: function(elementName) { elementName = elementName.toUpperCase(); // try innerHTML approach var parentTag = this.NODEMAP[elementName] || 'div'; var parentElement = document.createElement(parentTag); try { // prevent IE "feature": http://dev.rubyonrails.org/ticket/2707 parentElement.innerHTML = "<" + elementName + "></" + elementName + ">"; } catch(e) {} var element = parentElement.firstChild || null; // see if browser added wrapping tags if(element && (element.tagName.toUpperCase() != elementName)) element = element.getElementsByTagName(elementName)[0]; // fallback to createElement approach if(!element) element = document.createElement(elementName); // abort if nothing could be created if(!element) return; // attributes (or text) if(arguments[1]) if(this._isStringOrNumber(arguments[1]) || (arguments[1] instanceof Array) || arguments[1].tagName) { this._children(element, arguments[1]); } else { var attrs = this._attributes(arguments[1]); if(attrs.length) { try { // prevent IE "feature": http://dev.rubyonrails.org/ticket/2707 parentElement.innerHTML = "<" +elementName + " " + attrs + "></" + elementName + ">"; } catch(e) {} element = parentElement.firstChild || null; // workaround firefox 1.0.X bug if(!element) { element = document.createElement(elementName); for(attr in arguments[1]) element[attr == 'class' ? 'className' : attr] = arguments[1][attr]; } if(element.tagName.toUpperCase() != elementName) element = parentElement.getElementsByTagName(elementName)[0]; } } // text, or array of children if(arguments[2]) this._children(element, arguments[2]); return $(element); }, _text: function(text) { return document.createTextNode(text); }, ATTR_MAP: { 'className': 'class', 'htmlFor': 'for' }, _attributes: function(attributes) { var attrs = []; for(attribute in attributes) attrs.push((attribute in this.ATTR_MAP ? this.ATTR_MAP[attribute] : attribute) + '="' + attributes[attribute].toString().escapeHTML().gsub(/"/,'&quot;') + '"'); return attrs.join(" "); }, _children: function(element, children) { if(children.tagName) { element.appendChild(children); return; } if(typeof children=='object') { // array can hold nodes and text children.flatten().each( function(e) { if(typeof e=='object') element.appendChild(e); else if(Builder._isStringOrNumber(e)) element.appendChild(Builder._text(e)); }); } else if(Builder._isStringOrNumber(children)) element.appendChild(Builder._text(children)); }, _isStringOrNumber: function(param) { return(typeof param=='string' || typeof param=='number'); }, build: function(html) { var element = this.node('div'); $(element).update(html.strip()); return element.down(); }, dump: function(scope) { if(typeof scope != 'object' && typeof scope != 'function') scope = window; //global scope var tags = ("A ABBR ACRONYM ADDRESS APPLET AREA B BASE BASEFONT BDO BIG BLOCKQUOTE BODY " + "BR BUTTON CAPTION CENTER CITE CODE COL COLGROUP DD DEL DFN DIR DIV DL DT EM FIELDSET " + "FONT FORM FRAME FRAMESET H1 H2 H3 H4 H5 H6 HEAD HR HTML I IFRAME IMG INPUT INS ISINDEX "+ "KBD LABEL LEGEND LI LINK MAP MENU META NOFRAMES NOSCRIPT OBJECT OL OPTGROUP OPTION P "+ "PARAM PRE Q S SAMP SCRIPT SELECT SMALL SPAN STRIKE STRONG STYLE SUB SUP TABLE TBODY TD "+ "TEXTAREA TFOOT TH THEAD TITLE TR TT U UL VAR").split(/\s+/); tags.each( function(tag){ scope[tag] = function() { return Builder.node.apply(Builder, [tag].concat($A(arguments))); }; }); } };
JavaScript
ertekelo.ertekeles = { userSelect : null, datumEvSelect : null, datumHoSelect : null, ertekelt : null, init : function(){ ertekelo.ertekeles.userSelect = $('ErtekelesErtekeltUserid'); ertekelo.ertekeles.ertekelt = JSON.parse($('ErtekelesErtekelesek').value); Event.observe(ertekelo.ertekeles.userSelect, 'change', ertekelo.ertekeles.userSelectHandler); Event.observe(ertekelo.ertekeles.datumEvSelect, 'change', ertekelo.ertekeles.datumEvSelectHandler); Event.observe(ertekelo.ertekeles.datumHoSelect, 'change', ertekelo.ertekeles.datumHoSelectHandler); },//ertekelo.ertekeles.init userSelectHandler : function(e){ //kiválasztott egy usert szűrjük le a dátum selecteket if(ertekelo.ertekeles.ertekelt[e.target.value] != undefined){ //már van erre a userre értékelés //ki kell szűrni a dátumokból azokat az optionokat amelyekre már vannak értékelések var stop; } },//ertekelo.ertekeles.userSelectHandler datumEvSelectHandler : function(){e},//ertekelo.ertekeles.datumEvSelectHandler datumHoSelectHandler : function(){e}//ertekelo.ertekeles.datumHoSelectHandler } document.observe('dom:loaded', function(){ ertekelo.ertekeles.init(); });
JavaScript
root theme js file
JavaScript
nested theme js file
JavaScript
alert('win sauce');
JavaScript
alert('plugin one nested js file');
JavaScript
alert("Test App");
JavaScript
alert('I am a root level file!');
JavaScript
.pragma library function getDatabase() { return openDatabaseSync("tbclient", "1.0", "StorageDatabase", 10000000); } function initialize() { var db = getDatabase(); db.transaction( function(tx) { tx.executeSql('CREATE TABLE IF NOT EXISTS userInfo(userId TEXT UNIQUE, userName TEXT, BDUSS TEXT, password TEXT)'); tx.executeSql('CREATE TABLE IF NOT EXISTS bookmark(threadId TEXT UNIQUE, postId TEXT, author TEXT, title TEXT, isLz BOOLEAN)'); tx.executeSql('CREATE TABLE IF NOT EXISTS customEmo(name TEXT UNIQUE, thumbnail TEXT, imageinfo TEXT)'); }); } function saveUserInfo(userId, userName, BDUSS){ var db = getDatabase(); var res = false; db.transaction(function(tx) { var rs = tx.executeSql('INSERT OR REPLACE INTO userinfo VALUES (?,?,?,?);', [userId, userName, BDUSS, ""]); res = rs.rowsAffected > 0 }) return res; } function getUserInfo(userId){ var db = getDatabase() var res = [] db.readTransaction(function(tx){ if (userId != undefined){ var rs = tx.executeSql('SELECT * FROM userInfo WHERE userId=?;',[userId]); if (rs.rows.length > 0){ var t = rs.rows.item(0) res.push({ userId: t.userId, userName: t.userName, BDUSS: t.BDUSS }) } } else { var rs = tx.executeSql('SELECT * FROM userInfo') for (var i =0, l = rs.rows.length; i < l; i++){ var t = rs.rows.item(i) res.push({ userId: t.userId, userName: t.userName, BDUSS: t.BDUSS }) } } }) return res; } function deleteUserInfo(userId){ var db = getDatabase() db.transaction(function(tx){ if (userId){ tx.executeSql('DELETE FROM userInfo WHERE userId=?;',[userId]) } else { tx.executeSql('DELETE FROM userInfo') } }) } function saveBookMark(threadId, postId, author, title, isLz){ var db = getDatabase() var res = false db.transaction(function(tx) { var rs = tx.executeSql('INSERT OR REPLACE INTO bookmark VALUES (?,?,?,?,?);', [threadId, postId, author, title, isLz]); res = rs.rowsAffected > 0}); return res } function getBookMark(listModel){ var db = getDatabase() listModel.clear() db.readTransaction(function(tx) { var rs = tx.executeSql('SELECT * FROM bookmark') for (var i=0, l=rs.rows.length;i<l;i++){ var t = rs.rows.item(i) listModel.append({ threadId: t.threadId, postId: t.postId, author: t.author, title: t.title, isLz: t.isLz }) }}) } function deleteBookMark(threadId){ var db = getDatabase(); db.transaction(function(tx) { if (threadId) tx.executeSql('DELETE FROM bookmark WHERE threadId =?;',[threadId]) else tx.executeSql('DELETE FROM bookmark') }) } function getCustomEmo(){ var db = getDatabase() var res = [] db.readTransaction(function(tx){ var rs = tx.executeSql('SELECT * FROM customEmo') for (var i =0, l = rs.rows.length; i < l; i++){ var t = rs.rows.item(i) res.push({ name: t.name, thumbnail: t.thumbnail, imageinfo: t.imageinfo }) } }) return res; } function addCustomEmo(name, thumbnail, imageinfo){ var db = getDatabase(); var res = false; db.transaction(function(tx) { var rs = tx.executeSql('INSERT OR REPLACE INTO customEmo VALUES (?,?,?);', [name, thumbnail, imageinfo]); res = rs.rowsAffected > 0 }) return res; } function deleteCustomEmo(name){ var db = getDatabase(); db.transaction(function(tx) { if (name) tx.executeSql('DELETE FROM customEmo WHERE name =?;',[name]) else tx.executeSql('DELETE FROM customEmo') }) }
JavaScript
//image_emoticon.png var emotion_name = [ "呵呵", "哈哈", "吐舌", "啊", "酷", "怒", "开心", "汗", "泪", "黑线", "鄙视", "不高兴", "真棒", "钱", "疑问", "阴险", "吐", "咦", "委屈", "花心", "呼~", "笑眼", "冷", "太开心", "滑稽", "勉强", "狂汗", "乖", "睡觉", "惊哭", "升起", "惊讶", "喷", "爱心", "心碎", "玫瑰", "礼物", "彩虹", "星星月亮", "太阳", "钱币", "灯炮", "茶杯", "蛋糕", "音乐", "haha", "胜利", "大拇指", "弱", "OK" ] //ali_059.png var ali_file = [ 47, 50, 51, 52, 53, 54, 55, 56, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70 ] var ali_name = [ "哭着跑", "惆怅~", "摸头", "蹭", "打滚", "叩拜", "摸", "数钱", "加1", "压力", "表逼我", "人呢", "摇晃", "打地鼠", "这个屌", "恐慌", "晕乎乎", "浮云", "给力", "杯具了" ] //yz_001.png var yz_file = [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 16, 17, 18, 19, 20, 21 ] var yz_name = [ "焦糖舞", "翻滚", "拍屁股做鬼脸", "不", "河蟹掉啦", "哦耶", "我倒", "投降", "听音乐", "被砸", "吐舌头", "太好啦", "财源滚滚", "人去哪了", "偷笑", "卷被", "看楼上", "我抽", "有木有", "哭" ] //b01.png var b_name = [ "微笑", "帅哥", "美女", "老大", "哈哈哈", "奸笑", "傻乐", "飞吻", "害羞", "花痴", "憧憬", "你牛", "鼓掌", "可爱", "太委屈", "大哭", "泪奔", "寻死", "非常惊讶", "表示疑问" ]
JavaScript
.pragma library Qt.include("storage.js") var signalCenter; var tbsettings; var userId = "", userName = "", BDUSS = ""; var tbs = ""; var clientId = "wappc_"+Date.now()+"_"+Math.floor(Math.random()*1000) function sendWebRequest(method, url, callback, postText, param){ var xhr = new XMLHttpRequest() xhr.onreadystatechange = function(){ switch(xhr.readyState){ case xhr.OPENED: signalCenter.loadStarted() break; case xhr.HEADERS_RECEIVED: if (xhr.status != 200) signalCenter.loadFailed("连接错误,代码:"+xhr.status+" "+xhr.statusText) break; case xhr.DONE: if (xhr.status == 200){ try { callback(xhr.responseText.replace(/id\":(\d+)/g,'id":"$1"'), param) signalCenter.loadFinished() } catch (e){ console.log(JSON.stringify(e)) signalCenter.loadFailed("") } } else { signalCenter.loadFailed("") } break; } } xhr.open(method, url) if (method == "POST"){ xhr.setRequestHeader("Content-Type","application/x-www-form-urlencoded") xhr.setRequestHeader("Content-Length",postText.length) xhr.send(postText) } else { xhr.send() } } function stringify(obj){ var s = "" for (var i in obj) s += i+"="+obj[i] var sign = Qt.md5(decodeURIComponent(s)+"tiebaclient!!!").toUpperCase() var res = "" for (var i in obj) res += "&"+i+"="+obj[i] res += "&sign="+sign return res.replace("&","") } function login(caller, isPhoneNumber, username, password, vcode, vcodeMd5){ signalCenter.loginStarted(caller) var obj = { _client_type: tbsettings.clientType, _client_version: tbsettings.clientVersion, from: tbsettings.from, isphone: isPhoneNumber?1:0, net_type: tbsettings.netType, passwd: Qt.btoa(password), un: encodeURIComponent(username) } if (vcode) obj.vcode = vcode if (vcodeMd5) obj.vcode_md5 = vcodeMd5 sendWebRequest("POST", tbsettings.host+"/c/s/login", loginResult, stringify(obj), caller) } function loginResult(oritxt, caller){ var obj = JSON.parse(oritxt) //console.log("login=============================", oritxt) if (obj.error_code != 0){ signalCenter.loginFailed(caller, obj.error_msg) if (obj.anti.need_vcode == 1){ signalCenter.needVCode(caller, obj.anti.vcode_pic_url, obj.anti.vcode_md5) } } else { tbs = obj.anti.tbs userId = obj.user.id; userName = obj.user.name; BDUSS = obj.user.BDUSS signalCenter.loginSuccessed(caller, userId, userName, BDUSS) } } function getMyBarList(listModel){ signalCenter.getMyBarListStarted() var obj = { BDUSS: BDUSS, _client_type: tbsettings.clientType, _client_version: tbsettings.clientVersion, _phone_imei: tbsettings.imei, ctime: new Date().getTime(), from: tbsettings.from, net_type: tbsettings.netType } sendWebRequest("POST", tbsettings.host+"/c/f/forum/favolike", loadMyBarList, stringify(obj), listModel) } function loadMyBarList(oritxt, listModel, cached){ var obj = JSON.parse(oritxt) if (obj.error_code!=0) signalCenter.getMyBarListFailed(obj.error_msg) else { tbs = obj.anti.tbs listModel.clear() for (var i in obj.forum_list) listModel.append(obj.forum_list[i]) signalCenter.getMyBarListSuccessed(oritxt, cached||false) } } function getForumSuggest(searchText, listModel){ signalCenter.getForumSuggestStarted() listModel.clear() var obj = { BDUSS: BDUSS, _client_type: tbsettings.clientType, _client_version: tbsettings.clientVersion, _phone_imei: tbsettings.imei, from: tbsettings.from, net_type: tbsettings.netType, q: encodeURIComponent(searchText, listModel) } sendWebRequest("POST", tbsettings.host+"/c/f/forum/sug", loadForumSuggest, stringify(obj), listModel) } function loadForumSuggest(oritxt, listModel){ var obj = JSON.parse(oritxt) if (obj.error_code!=0) signalCenter.getForumSuggestFailed(obj.error_msg) else { for (var i in obj.fname){ listModel.append({ "is_like": 0, "name": obj.fname[i] }) } signalCenter.getForumSuggestSuccessed(obj.error_msg) } } function getArticleList(caller, forumModel, goodModel, pageNumber, classid, isGood, keyword){ signalCenter.loadForumStarted(caller) var obj = { BDUSS: BDUSS, _client_type: tbsettings.clientType, _client_version: tbsettings.clientVersion, _phone_imei: tbsettings.imei, cid: isGood?classid:0, ctime: new Date().getTime(), from: tbsettings.from, is_good: isGood ? 1: 0, kw: encodeURIComponent(keyword), net_type: tbsettings.netType, pn: pageNumber, rn: 35, st_type: "tb_forumlist" } sendWebRequest("POST", tbsettings.host+"/c/f/frs/page", loadArticleList, stringify(obj), [forumModel, goodModel, caller]) } function loadArticleList(oritxt, param){ var obj = JSON.parse(oritxt) if (obj.error_code != 0){ signalCenter.loadForumFailed(param[2], obj.error_msg) } else { tbs = obj.anti.tbs param[1].clear() for (var i in obj.forum.good_classify) param[1].append(obj.forum.good_classify[i]) param[0].clear() for (var i in obj.thread_list){ var t = obj.thread_list[i]; var pic = []; for (var j=0;j<t.media.length && pic.length < 3;j++){ if (t.media[j].type == 3){ pic.push(t.media[j].big_pic) } } t.pic = pic; param[0].append({"data": t}) } signalCenter.loadForumSuccessed(param[2], obj.forum, obj.page, obj.anti.forbid_info) } } function getThreadList(page, threadId, option){ signalCenter.loadThreadStarted(page.toString()) var obj = { BDUSS: BDUSS, _client_id: clientId, _client_type: tbsettings.clientType, _client_version: tbsettings.clientVersion, _phone_imei: tbsettings.imei, back: option.back||0, ctime: Date.now().toString().slice(-4), from: tbsettings.from, kz: threadId, last: option.last||0, lz: option.lz||0, mark: option.mark||0, net_type: tbsettings.netType, pid: option.pid||0, pn: option.pn||0, r: option.r||0, rn: option.rn||60, st_type: "tb_frslist" } sendWebRequest("POST", tbsettings.host+"/c/f/pb/page", loadThreadList, stringify(obj), [page, option]) } function loadThreadList(oritxt, param){ var obj = JSON.parse(oritxt) if (obj.error_code!=0){ signalCenter.loadThreadFailed(param[0].toString(), obj.error_msg) } else { tbs = obj.anti.tbs var p = param[0] p.hasFloor = obj.has_floor == 1 p.forum = obj.forum p.thread = obj.thread p.currentPage = obj.page.current_page p.totalPage = obj.page.total_page p.manageGroup = obj.user.is_manager || (obj.user.id == obj.thread.author.id ? 3 : 0) var opt = param[1] if (opt.back){ if (opt.renew){ p.downPage = obj.page.current_page p.hasDownwards = obj.page.has_more == 1; p.listModel.clear(); } p.hasUpwards = obj.page.has_prev == 1 p.topPage = obj.page.current_page for (var i in obj.post_list){ var t = obj.post_list[i] t.contentData = decodeThreadContentList(t.content) p.listModel.insert(i, {"data":t}) } p.threadView.positionViewAtIndex(obj.post_list.length, 3) } else { if (opt.renew){ p.topPage = obj.page.current_page p.hasUpwards = obj.page.has_prev == 1 p.listModel.clear() } p.hasDownwards = obj.page.has_more == 1 p.downPage = obj.page.current_page for (var i in obj.post_list){ var t = obj.post_list[i] t.contentData = decodeThreadContentList(t.content) p.listModel.append({"data":t}) } } signalCenter.loadThreadSuccessed(p.toString()) } } function postReply(callerItem, content, forum, threadId, floorNum, quoteId, vcode, vcodeMd5){ signalCenter.postReplyStarted(callerItem.toString()) content = adjustCustomEmotion(content) if (tbsettings.signText != "") content += "\n"+tbsettings.signText var obj = { BDUSS: BDUSS, _client_type: tbsettings.clientType, _client_version: tbsettings.clientVersion, _phone_imei: tbsettings.imei, anonymous: 0, content: encodeURIComponent(content), fid: forum.id, floor_num: floorNum||0, from: tbsettings.from, kw: encodeURIComponent(forum.name), net_type: tbsettings.netType, quote_id: quoteId||0, tbs: tbs, tid: threadId } if (vcode){ obj.vcode = vcode; obj.vcode_md5 = vcodeMd5 } sendWebRequest("POST", tbsettings.host+"/c/c/post/add", replyResult, stringify(obj), {callerItem: callerItem, threadId: threadId}) } function replyResult(oritxt, param){ var obj = JSON.parse(oritxt) if (obj.error_code != 0){ signalCenter.postReplyFailed(param.callerItem.toString(), obj.error_msg) //console.log("reply===========================", oritxt) if (obj.info && obj.info.vcode_md5){ signalCenter.needVCode(param.callerItem.toString(), obj.info.vcode_pic_url, obj.info.vcode_md5) } } else { signalCenter.postReplySuccessed(param.callerItem.toString()) } } function getFriendList(caller, type, param, uid, listModel, isRenew, pageNumber){ signalCenter.getFriendListStarted(caller) var obj = { BDUSS: BDUSS, _client_type: tbsettings.clientType, _client_version: tbsettings.clientVersion, _phone_imei: tbsettings.imei, from: tbsettings.from, net_type: tbsettings.netType } if (pageNumber) obj.pn = pageNumber if (uid) obj.uid = uid if (isRenew) listModel.clear() sendWebRequest("POST", tbsettings.host+"/c/u/"+type+"/"+param, loadFriendList, stringify(obj), [caller, listModel]) } function loadFriendList(oritxt, param){ var obj = JSON.parse(oritxt) if (obj.error_code != 0){ signalCenter.getFriendListFailed(param[0], obj.error_msg) } else { for (var i in obj.user_list) param[1].append(obj.user_list[i]) signalCenter.getFriendListSuccessed(param[0], obj.page) } } function getFollowSuggest(caller, quest, friendModel, filterModel){ signalCenter.getFriendListStarted(caller) var obj = { BDUSS: BDUSS, _client_type: tbsettings.clientType, _client_version: tbsettings.clientVersion, _phone_imei: tbsettings.imei, from: tbsettings.from, net_type: tbsettings.netType, q: encodeURIComponent(quest), uid: userId } sendWebRequest("POST", tbsettings.host+"/c/u/follow/sug", loadFollowSuggest, stringify(obj), [caller, friendModel, filterModel]) } function loadFollowSuggest(oritxt, param){ var obj = JSON.parse(oritxt) if (obj.error_code != 0){ signalCenter.getFriendListFailed(param[0], obj.error_msg) } else { param[2].clear() for (var i=0, l=param[1].count; i<l; i++){ for (var j in obj.uname){ var t = param[1].get(i) if (t.name == obj.uname[j]) param[2].append(t) } } signalCenter.getFriendListSuccessed(param[0], undefined) } } function getSubfloorList(page, threadId, option){ console.log(JSON.stringify(option)) signalCenter.getSubfloorListStarted(page.toString()) var obj = { BDUSS: BDUSS, _client_id: clientId, _client_type: tbsettings.clientType, _client_version: tbsettings.clientVersion, _phone_imei: tbsettings.imei, from: tbsettings.from, kz: threadId, net_type: tbsettings.netType, pid: option.pid||0, pn: option.pn||0, spid: option.spid||0, tbs: tbs } sendWebRequest("POST", tbsettings.host+"/c/f/pb/floor", loadSubfloorList, stringify(obj), [page, option]) } function loadSubfloorList(oritxt, param){ var obj = JSON.parse(oritxt) if (obj.error_code != 0){ signalCenter.getSubfloorListFailed(param[0].toString(), obj.error_msg) } else { var p = param[0] p.forum = obj.forum; p.thread = obj.thread; obj.post.contentString = decodeThreadContent(obj.post.content) p.post = obj.post tbs = obj.anti.tbs p.page = obj.page p.postId = obj.post.id p.pageNumber = obj.page.current_page||1 var m = p.view.model; if (param[1].renew){ m.clear(); p.view.positionViewAtBeginning(); } for (var i in obj.subpost_list){ var t = obj.subpost_list[i] t.contentString = decodeThreadContent(t.content) m.append({"data": t}) } signalCenter.getSubfloorListSuccessed(p.toString()) } } function getReplyList(pageNumber, isRenew, replyModel){ signalCenter.getReplyListStarted() var obj = { BDUSS: BDUSS, _client_type: tbsettings.clientType, _client_version: tbsettings.clientVersion, _phone_imei: tbsettings.imei, from: tbsettings.from, net_type: tbsettings.netType, pn: pageNumber, uid: userId } sendWebRequest("POST", tbsettings.host+"/c/u/feed/replyme", loadReplyToMeResult, stringify(obj), [isRenew, replyModel]) } function loadReplyToMeResult(oritxt, param, cached){ var obj = JSON.parse(oritxt) if (obj.error_code!=0){ signalCenter.getReplyListFailed(obj.error_msg) } else { if (param[0]) param[1].clear() for (var i in obj.reply_list) param[1].append(obj.reply_list[i]) if (!cached) loadMessageObj(obj.message) signalCenter.getReplyListSuccessed(oritxt, obj.page, cached||false) } } function getAtMeList(pageNumber, isRenew, atModel){ signalCenter.getAtListStarted() var obj = { BDUSS: BDUSS, _client_type: tbsettings.clientType, _client_version: tbsettings.clientVersion, _phone_imei: tbsettings.imei, from: tbsettings.from, net_type: tbsettings.netType, pn: pageNumber, uid: userId } sendWebRequest("POST", tbsettings.host+"/c/u/feed/atme", loadAtMeList, stringify(obj), [isRenew, atModel]) } function loadAtMeList(oritxt, param, cached){ var obj = JSON.parse(oritxt) if (obj.error_code != 0){ signalCenter.getAtListFailed(obj.error_msg) } else { if(param[0]) param[1].clear() for (var i in obj.at_list) param[1].append(obj.at_list[i]) if (!cached) loadMessageObj(obj.message) signalCenter.getAtListSuccessed(oritxt, obj.page, cached||false) } } function ding(caller, forum, threadId){ signalCenter.dingStarted(caller) var obj = { BDUSS: BDUSS, _client_type: tbsettings.clientType, _client_version: tbsettings.clientVersion, _phone_imei: tbsettings.imei, fid: forum.id, from: tbsettings.from, kw: encodeURIComponent(forum.name), net_type: tbsettings.netType, tbs: tbs, tid: threadId } sendWebRequest("POST", tbsettings.host+"/c/c/thread/comment", dingResult, stringify(obj), caller) } function dingResult(oritxt, caller){ var obj = JSON.parse(oritxt) if (obj.error_code != 0) signalCenter.dingFailed(caller, obj.error_msg) else signalCenter.dingSuccessed(caller) } function getMessage(){ signalCenter.getMessageStarted() var obj = { BDUSS: BDUSS, _client_type: tbsettings.clientType, _client_version: tbsettings.clientVersion, _phone_imei: tbsettings.imei, from: tbsettings.from, net_type: tbsettings.netType } sendWebRequest("POST", tbsettings.host+"/c/s/msg", loadMessage, stringify(obj)) } function loadMessage(oritxt){ var obj = JSON.parse(oritxt) if (obj.error_code != 0) signalCenter.getMessageFailed(obj.error_msg) else { loadMessageObj(obj.message) } } function loadMessageObj(obj){ var msg = "", type = "" if (obj.fans > 0 && tbsettings.remindNewFans){ msg += "\n"+obj.fans+"个新粉丝"; type = "fans" } if (obj.replyme > 0 && tbsettings.remindReplyToMe){ msg += "\n"+obj.replyme+"个新回复"; type = "replyme" } if (obj.atme > 0 && tbsettings.remindAtMe){ msg += "\n"+obj.atme+"处提到我"; type = "atme" } signalCenter.getMessageSuccessed(msg.replace("\n", ""), type) } function getProfile(caller){ signalCenter.getProfileStarted(caller.toString()) var obj = { BDUSS: BDUSS, _client_type: tbsettings.clientType, _client_version: tbsettings.clientVersion, _phone_imei: tbsettings.imei, from: tbsettings.from, net_type: tbsettings.netType, uid: caller.userId } sendWebRequest("POST", tbsettings.host+"/c/u/user/profile", loadProfile, stringify(obj), caller) } function loadProfile(oritxt, caller){ var obj = JSON.parse(oritxt) if (obj.error_code!=0) signalCenter.getProfileFailed(caller.toString(), obj.error_msg) else { tbs = obj.anti.tbs caller.user = obj.user signalCenter.getProfileSuccessed(caller.toString()) } } function followFriend(caller, isConcern){ signalCenter.concernStarted(caller.toString()) var obj = { BDUSS: BDUSS, _client_type: tbsettings.clientTpe, _client_version: tbsettings.clientVersion, _phone_imei: tbsettings.imei, from: tbsettings.from, net_type: tbsettings.netType, portrait: caller.user.portrait, tbs: tbs } var url = isConcern ? "/c/c/user/follow" : "/c/c/user/unfollow" sendWebRequest("POST", tbsettings.host+url, followResult, stringify(obj), [caller, isConcern]) } function followResult(oritxt, param){ var obj = JSON.parse(oritxt) if (obj.error_code != 0) signalCenter.concernFailed(param[0].toString(), obj.error_msg) else { param[0].hasConcerned = param[1] signalCenter.concernSuccessed(param[0].toString()) } } function signIn(caller){ signalCenter.signInStarted(caller.toString()) var obj = { BDUSS: BDUSS, _client_type: tbsettings.clientType, _client_version: tbsettings.clientVersion, _phone_imei: tbsettings.imei, from: tbsettings.from, kw: encodeURIComponent(caller.forum.name), net_type: tbsettings.netType, tbs: tbs } sendWebRequest("POST", tbsettings.host+"/c/c/forum/sign", signInResult, stringify(obj), [caller]) } function signInResult(oritxt, param){ var obj = JSON.parse(oritxt) if (obj.error_code != 0){ signalCenter.signInFailed(param[0].toString(), obj.error_msg) } else { signalCenter.signInSuccessed(param[0].toString(), obj.user_info) } } function likeForum(caller, islike){ var obj = { BDUSS: BDUSS, _client_type: tbsettings.clientType, _client_version: tbsettings.clientVersion, _phone_imei: tbsettings.imei, fid: caller.forum.id, from: tbsettings.from, kw: encodeURIComponent(caller.forum.name), net_type: tbsettings.netType, tbs: tbs } sendWebRequest("POST", tbsettings.host+"/c/c/forum/"+(islike?"like":"unlike"), likeForumResult, stringify(obj), caller) } function likeForumResult(oritxt, caller){ var obj = JSON.parse(oritxt) if (obj.error_code!=0) signalCenter.likeForumFailed(caller.toString(), obj.error_msg) else { signalCenter.likeForumSuccessed(caller.toString()) } } function getRecommendPic(){ var obj = { ak: randomString(), ap: "tieba", os: "android" } sendWebRequest("POST", tbsettings.host+"/c/s/recommendPic/", getRecommendPicResult, stringify(obj)) } function getRecommendPicResult(oritxt){ //console.log(oritxt) var obj = JSON.parse(oritxt) if (obj.error_code != 0){ signalCenter.getRecommendPicFailed(obj.error_msg) } else { signalCenter.getRecommendPicSuccessed(obj.recommend_pic) } } function postArticle(caller, title, content, forum, vcode, vcodeMd5){ signalCenter.postArticleStarted(caller.toString()) content = adjustCustomEmotion(content) if (tbsettings.signText != "") content += "\n"+tbsettings.signText var obj = { BDUSS: BDUSS, _client_type: tbsettings.clientType, _client_version: tbsettings.clientVersion, _phone_imei: tbsettings.imei, anonymous: 0, content: encodeURIComponent(content), fid: forum.id, from: tbsettings.from, kw: encodeURIComponent(forum.name), net_type: tbsettings.netType, tbs: tbs, title: encodeURIComponent(title) } if (vcode){ obj.vcode = vcode obj.vcode_md5 = vcodeMd5 } sendWebRequest("POST", tbsettings.host+"/c/c/thread/add", postArticleResult, stringify(obj), [caller]) } function postArticleResult(oritxt, param){ var obj = JSON.parse(oritxt) //console.log("post===================", oritxt) if (obj.error_code != 0){ signalCenter.postArticleFailed(param[0].toString(), obj.error_msg) if (obj.info && obj.info.vcode_md5){ signalCenter.needVCode(param[0].toString(), obj.info.vcode_pic_url, obj.info.vcode_md5) } } else { signalCenter.postArticleSuccessed(param[0].toString()) } } function threadManage(caller, option, postId, isVipDel, isFloor, source){ var obj = { BDUSS: BDUSS, _client_id: clientId, _client_type: tbsettings.clientType, _client_version: tbsettings.clientVersion, _phone_imei: tbsettings.imei, fid: caller.forum.id, from: tbsettings.from, is_vipdel: isVipDel?1:0, isfloor: isFloor?1:0, net_type: tbsettings.netType, pid: postId, src: source, tbs: tbs, word: encodeURIComponent(caller.forum.name), z: caller.thread.id } sendWebRequest("POST", tbsettings.host+"/c/c/bawu/"+option, threadManageResult, stringify(obj), [caller, option, postId]) } function threadManageResult(oritxt, param){ var obj = JSON.parse(oritxt) if (obj.error_code != 0){ signalCenter.manageFailed(param[0].toString(), obj.error_msg) } else { signalCenter.manageSuccessed(param[0].toString(), param[1], param[2]) } } function commitprison(caller, username, day){ var obj = { BDUSS: BDUSS, _client_id: clientId, _client_type: tbsettings.clientType, _client_version: tbsettings.clientVersion, _phone_imei: tbsettings.imei, day: day, fid: caller.forum.id, from: tbsettings.from, net_type: tbsettings.netType, ntn: "banid", tbs: tbs, un: encodeURIComponent(username), word: encodeURIComponent(caller.forum.name), z: caller.thread.id } sendWebRequest("POST", tbsettings.host+"/c/c/bawu/commitprison", commitprisonResult, stringify(obj), [caller]) } function commitprisonResult(oritxt, param){ var obj = JSON.parse(oritxt) if (obj.error_code != 0){ signalCenter.manageFailed(param[0].toString(), obj.error_msg) } else { signalCenter.manageSuccessed(param[0].toString(), "commitprison", "") } } /////////////////////////////////////////////////////////////////////// function decodeThreadContentList(obj){ var res = [] var len = -1 for (var i in obj){ var o = obj[i] if (o.type == 3){ res.push([false, o.src, o.bsize]) len ++ } else { //[isText, Content, isRichText] if (!res[len] || !res[len][0]){ res.push([true,"",false]) len ++ } if (o.type!=0 && !res[len][2]) res[len][2] = true switch(o.type){ case 0: res[len][1] += o.text || "" break case 1: res[len][1] += "<a href=\"link:%1\">%2</a>".arg(o.link).arg(o.text); break case 2: var txt = o.text.replace(/i_f/,"write_face_") var sfx = /(B|t|w)_/.test(txt)?".gif\"/>":".png\"/>" res[len][1] += "<img src=\"qrc:/emo/pics/" + txt.toLowerCase() + sfx break; case 4: res[len][1] += "<a href=\"at:%1\">%2</a>".arg(o.uid).arg(o.text); break case 5: res[len][1] += "<a href=\"video:%1\" >点击链接查看视频</a>".arg(o.text); break } } } return res } function decodeThreadContent(obj){ var res = "" for (var i in obj){ switch(obj[i].type){ case 0: res += (obj[i].text || "").replace(/</g,"&lt;").replace(/\n/g,"<br/>"); break; case 1: res += "<a href=\"link:%1\">%2</a>".arg(obj[i].link).arg(obj[i].text); break case 2: var txt = obj[i].text.replace(/i_f/,"write_face_") var sfx = /(B|t|w)_/.test(txt)?".gif\"/>":".png\"/>" res += "<img src=\"qrc:/emo/pics/" + txt.toLowerCase() + sfx break; case 3: if (tbsettings.showImage) res += "<a href=\"img:%1\" ><img src=\"%1\"/></a><br/>".arg(obj[i].src) else res += "<a href=\"img:%1\" >点击链接查看图片</a><br/>".arg(obj[i].src) break; case 4: res += "<a href=\"at:%1\">%2</a>".arg(obj[i].uid).arg(obj[i].text); break case 5: res += "<a href=\"video:%1\" >点击链接查看视频</a>".arg(obj[i].text); break } } return res } function formatDateTime(milisec){ var mydate = new Date(milisec) if (mydate.toDateString()==new Date().toDateString()) return Qt.formatTime(mydate, "hh:mm:ss") else return Qt.formatDate(mydate, "yyyy-MM-dd") } function randomString(){ var res = Qt.md5(Math.random())+Qt.md5(Math.random()) return res.slice(0, 45) } function adjustCustomEmotion(content){ var el = getCustomEmo() function change(emo){ var name = emo.substring(2) for (var i in el){ if (el[i].name == name) return "#("+el[i].imageinfo } return emo } return content.replace(/#\([^)]*/g, change) }
JavaScript
function linkActivated(link){ var l = link.split(":") switch (l[0]){ case "at": { if (l[1]!=0) enterProfilePage(l[1]) break; } case "link": { var url = link.slice(link.indexOf(":")+1) var m; m = url.match(/tieba.baidu.com\/(p\/|f\?.*z=)(\d+)/) if (m) return enterThread(m[2]) m = url.match(/c.tieba.baidu.com\/f\?.*kw=(.+)/) if (m) return enterForum(m[1]) m = url.match(/tieba.baidu.com\/f\?.*kw=(.+?)[&#]/) if (m) return enterForum(decodeForumName(m[1])) m = url.match(/tieba.baidu.com\/f\?.*kw=(.+)/) if (m) return enterForum(decodeForumName(m[1])) utility.openURLDefault(url) break; } case "img": { loadImage(link.slice(link.indexOf(":")+1)) break; } case "video": { loadVideo(link.slice(link.indexOf(":")+1)) break; } } } function decodeForumName(oristring){ var i = 0, res = "" while (i<oristring.length){ if ( oristring.charAt(i)!="%" || i+2>oristring.length ){ res += oristring.charCodeAt(i).toString(16) i ++ } else { res += oristring.charAt(i+1) + oristring.charAt(i+2) i += 3 } } return utility.decodeGBKHex(res) } function loadImage(url){ if (tbsettings.openWithSystem){ manager.abortDownload() var f = tbsettings.imagePath + "/" + Qt.md5(url) + "." + url.split("\.").pop() if (manager.existsFile(f)) utility.openFileDefault("file:///"+f) else { Qt.createComponent("Component/ImageShower.qml").createObject(app) manager.appendDownload(url, f) } } else pageStack.push(Qt.resolvedUrl("ImagePage.qml"), { imgUrl: url }) } function loadVideo(url){ var v; v = url.match(/youku.*v_show\/id_(.+)\./) || url.match(/youku.*\/sid\/(.+)\//) if (v){ getYoukuSource(v[1], "3gphd") return } v = url.match(/56\.com.*\/v_(.+)\./) if (v){ get56Source(url, v[1]) return } v = url.match(/yinyuetai.*\/player\/(.+)\//) if (v){ console.log(v) getYinyuetaiSource(url, v[1]) return } v = url.match(/video\.sina\..*vid=(\d+)_\d+/) || url.match(/video\.sina\..*v\/b\/(\d+)-\d+/) if (v){ getSinaSource(url, v[1]) return } utility.openURLDefault(url) } function getYoukuSource(sid, type){ app.showMessage("正在解析视频源...") var doc = new XMLHttpRequest() doc.onreadystatechange = function(){ switch (doc.readyState){ case doc.HEADERS_RECEIVED: { if (doc.status != 200){ app.showMessage("无法打开视频...> <") } break; } case doc.LOADING: { if (doc.status == 200){ if (!/text/.test(doc.getResponseHeader("content-type"))){ doc.abort() utility.launchPlayer("http://m.youku.com/pvs?id="+sid+"&format="+type) } } break; } case doc.DONE: { if (doc.status == 200){ if (type == "3gphd") getYoukuSource(sid, "3gp") else app.showMessage(doc.responseText) } break; } } } doc.open("GET", "http://m.youku.com/pvs?id="+sid+"&format="+type) doc.send() } function get56Source(url, seed){ app.showMessage("正在解析视频源...") var doc = new XMLHttpRequest() doc.onreadystatechange = function(){ switch(doc.readyState){ case doc.HEADERS_RECEIVED: { if (doc.status != 200) utility.openURLDefault(url) break; } case doc.DONE: { if (doc.status == 200){ try { var f = JSON.parse(doc.responseText).info.rfiles for (var i in f){ var u = f[i].url if (u.split(".").pop() == "mp4"){ utility.launchPlayer(u) return } } if (f) utility.openURLDefault(url) } catch(e){ utility.openURLDefault(url) } } break; } } } doc.open("GET", "http://vxml.56.com/json/%1/?src=out".arg(seed)) doc.send() } function getYinyuetaiSource(url, seed){ var doc = new XMLHttpRequest() doc.onreadystatechange = function(){ if (doc.readyState == doc.HEADERS_RECEIVED){ if (doc.status != 200) utility.openURLDefault(url) } else if (doc.readyState == doc.DONE){ if (doc.status == 200){ var s = doc.responseText.match(/http:\/\/[^:]*\.(flv|mp4|f4v|hlv)\?(t|sc)=[a-z0-9]*/g) if (s) utility.openURLDefault(s[0]) else utility.openURLDefault(url) } } } doc.open("GET", "http://www.yinyuetai.com/explayer/get-video-info?videoId="+seed+"&flex=true&platform=null") doc.send() } function getSinaSource(url, seed){ var doc = new XMLHttpRequest() doc.onreadystatechange = function(){ if (doc.readyState == doc.HEADERS_RECEIVED){ if (doc.status != 200){ utility.openURLDefault(url) } } else if (doc.readyState == doc.DONE){ if (doc.status == 200){ var d = JSON.parse(doc.responseText).ipad_vid if (d != 0){ utility.launchPlayer("http://v.iask.com/v_play_ipad.php?vid="+d) } else utility.openURLDefault(url) } } } doc.open("GET", "http://video.sina.com.cn/interface/video_ids/video_ids.php?v="+seed) doc.send() }
JavaScript
// ==UserScript== // @name 360搜索辅助 // @namespace http://www.xsecure.cn/ // @description 360搜索反百度屏蔽脚本 // @include http://so.360.cn/s?* // @include http://www.360sou.com/s?* // @include http://www.360so.com/s?* // @include http://www.360sou.net/s?* // @include http://www.sou.com/s?* // @include http://www.so.com/s?* // @include http://www.baidu.com/search/ressafe.html?* // @grant GM_openInTab // @updateURL https://userscripts.org/scripts/source/145461.meta.js // @downloadURL https://userscripts.org/scripts/source/145461.user.js // @version 0.2.3 // ==/UserScript== /*-----反百度重定向-----*/ function antiBaiduRedirect() { url = window.location.toString(); try { true_url = url.match(/^http:\/\/www\.baidu\.com\/search\/ressafe\.html\?(|.+&)url=(.+?)(&.+|$)/)[2] } catch(err) { return false; } window.location = true_url; return true; } /*------反百度屏蔽------*/ function antiBaiduShield() { // 获取当前域名 var href = window.location.host; // 如果依然被百度重定向,则直接刷新百度页面 if(href == "www.baidu.com") { return antiBaiduRedirect(); } // 获取360搜索页面容器节点 var container = document.getElementById("container"); var res = container.getElementsByTagName("a"); var is_baidu_url; for(var i in res) { is_baidu_url = false; // 获取父节点信息 var h3 = res[i].parentNode; try { if(h3.className.replace(/^\s*/, "").replace(/\s*$/, "") != "res-title") { // 类名不为res-title则直接跳过 continue; } } catch(err) { // 无法获取类名一样跳过 continue; } // 判断是否含有data-cache属性 var data_cache = res[i].getAttribute("data-cache"); if(data_cache) { // 移除data-cache属性,以免打开快照缓存页 res[i].removeAttribute("data-cache"); is_baidu_url = true; } else { try { // 获取所有带有360自己的direct.php跳转的链接(这个php就是为了反屏蔽,但显然不太成功) baidu_url = res[i].href.match(/^http:\/\/so\.360\.cn\/direct\.php\?f=360sou&u=(.+)$/)[1]; // 一些必要的编码转换 baidu_url = baidu_url.replace(/%3A/g, ":").replace(/%2F/g, "/").replace(/%3F/g, "?").replace(/%3D/g, "=").replace(/%26/g, "&"); // 将href替换为原始百度链接 res[i].href = baidu_url; is_baidu_url = true; } catch(err) { }; } if(is_baidu_url) { // 加入监听函数 res[i].addEventListener("click", function(event) { // 通过event.target获取目标,并解析出其中的url if(event.target.tagName == "EM") { targ_url = event.target.parentNode; } else { targ_url = event.target.toString(); } // 哥用GreaseMonkey调浏览器自己打开一个页面,有本事你连这个也给我屏蔽了! GM_openInTab(targ_url); event.preventDefault(); }, false ); } } } /*---------起始点----------*/ if(true) { antiBaiduShield(); }
JavaScript
/*-----反百度重定向-----*/ function antiBaiduRedirect() { url = window.location.toString(); try { true_url = url.match(/^http:\/\/www\.baidu\.com\/search\/ressafe\.html\?(|.+&)url=(.+?)(&.+|$)/)[2] } catch(err) { return false; } window.location = true_url; return true; } /*------反百度屏蔽------*/ function antiBaiduShield() { // 获取当前域名 var href = window.location.host; // 如果依然被百度重定向,则直接刷新百度页面 if(href == "www.baidu.com") { antiBaiduRedirect(); return null; } // 获取360搜索页面容器节点 var container = document.getElementById("container"); var res = container.getElementsByTagName("a"); var is_baidu_url; for(var i in res) { is_baidu_url = false; // 获取父节点信息 var h3 = res[i].parentNode; try { if(h3.className.replace(/^\s*/, "").replace(/\s*$/, "") != "res-title") { // 类名不为res-title则直接跳过 continue; } } catch(err) { // 无法获取类名一样跳过 continue; } // 判断是否含有data-cache属性 var data_cache = res[i].getAttribute("data-cache"); if(data_cache) { // 移除data-cache属性,以免打开快照缓存页 res[i].removeAttribute("data-cache"); is_baidu_url = true; } else { try { // 获取所有带有360自己的direct.php跳转的链接(这个php就是为了反屏蔽,但显然不太成功) baidu_url = res[i].href.match(/^http:\/\/so\.360\.cn\/direct\.php\?f=360sou&u=(.+)$/)[1]; // 一些必要的编码转换 baidu_url = baidu_url.replace(/%3A/g, ":").replace(/%2F/g, "/").replace(/%3F/g, "?").replace(/%3D/g, "=").replace(/%26/g, "&"); // 将href替换为原始百度链接 res[i].href = baidu_url; is_baidu_url = true; } catch(err) { }; } if(is_baidu_url) { // 加入监听函数 res[i].addEventListener("click", function(event) { // 通过event.target获取目标,并解析出其中的url if(event.target.tagName == "EM") { targ_url = event.target.parentNode; } else { targ_url = event.target.toString(); } // 向背景页发送请求,打开指定url地址 chrome.extension.sendRequest({url: targ_url}); event.preventDefault(); }, false ); } } } /*---------起始点----------*/ if(true) { antiBaiduShield(); }
JavaScript
function createTab() { chrome.extension.onRequest.addListener(function(feeds, sender, sendResponse) { chrome.tabs.create({"url": feeds.url, "index": sender.tab.index + 1}); sendResponse(); }); } if(true) { createTab(); }
JavaScript
/** * German translation * 2007-Apr-07 update by schmidetzki and humpdi * 2007-Oct-31 update by wm003 * 2009-Jul-10 update by Patrick Matsumura and Rupert Quaderer * 2010-Mar-10 update by Volker Grabsch */ Ext.onReady(function() { var cm = Ext.ClassManager, exists = Ext.Function.bind(cm.get, cm); if (Ext.Updater) { Ext.Updater.defaults.indicatorText = '<div class="loading-indicator">Übertrage Daten ...</div>'; } Ext.define("Ext.locale.de.view.View", { override: "Ext.view.View", emptyText: "" }); Ext.define("Ext.locale.de.grid.Panel", { override: "Ext.grid.Panel", ddText: "{0} Zeile(n) ausgewählt" }); Ext.define("Ext.locale.de.TabPanelItem", { override: "Ext.TabPanelItem", closeText: "Diesen Tab schließen" }); Ext.define("Ext.locale.de.form.Basic", { override: "Ext.form.Basic", waitTitle: "Bitte warten..." }); Ext.define("Ext.locale.de.form.field.Base", { override: "Ext.form.field.Base", invalidText: "Der Wert des Feldes ist nicht korrekt" }); // changing the msg text below will affect the LoadMask Ext.define("Ext.locale.de.view.AbstractView", { override: "Ext.view.AbstractView", msg: "Übertrage Daten..." }); if (Ext.Date) { Ext.Date.monthNames = ["Januar", "Februar", "März", "April", "Mai", "Juni", "Juli", "August", "September", "Oktober", "November", "Dezember"]; Ext.Date.getShortMonthName = function(month) { return Ext.Date.monthNames[month].substring(0, 3); }; Ext.Date.monthNumbers = { Jan: 0, Feb: 1, "M\u00e4r": 2, Apr: 3, Mai: 4, Jun: 5, Jul: 6, Aug: 7, Sep: 8, Okt: 9, Nov: 10, Dez: 11 }; Ext.Date.getMonthNumber = function(name) { return Ext.Date.monthNumbers[name.substring(0, 1).toUpperCase() + name.substring(1, 3).toLowerCase()]; }; Ext.Date.dayNames = ["Sonntag", "Montag", "Dienstag", "Mittwoch", "Donnerstag", "Freitag", "Samstag"]; Ext.Date.getShortDayName = function(day) { return Ext.Date.dayNames[day].substring(0, 3); }; } if (Ext.MessageBox) { Ext.MessageBox.buttonText = { ok: "OK", cancel: "Abbrechen", yes: "Ja", no: "Nein" }; // As of 4.0.4, setting the buttonText above does not take effect properly. This should be removable in 4.1.0 // (see issue EXTJSIV-3909) Ext.MessageBox.msgButtons['ok'].text = Ext.MessageBox.buttonText.ok; Ext.MessageBox.msgButtons['cancel'].text = Ext.MessageBox.buttonText.cancel; Ext.MessageBox.msgButtons['yes'].text = Ext.MessageBox.buttonText.yes; Ext.MessageBox.msgButtons['no'].text = Ext.MessageBox.buttonText.no; } if (exists('Ext.util.Format')) { Ext.util.Format.__number = Ext.util.Format.number; Ext.util.Format.number = function(v, format) { return Ext.util.Format.__number(v, format || "0.000,00/i"); }; Ext.apply(Ext.util.Format, { thousandSeparator: '.', decimalSeparator: ',', currencySign: '\u20ac', // German Euro dateFormat: 'd.m.Y' }); } Ext.define("Ext.locale.de.picker.Date", { override: "Ext.picker.Date", todayText: "Heute", minText: "Dieses Datum liegt von dem erstmöglichen Datum", maxText: "Dieses Datum liegt nach dem letztmöglichen Datum", disabledDaysText: "", disabledDatesText: "", monthNames: Ext.Date.monthNames, dayNames: Ext.Date.dayNames, nextText: "Nächster Monat (Strg/Control + Rechts)", prevText: "Vorheriger Monat (Strg/Control + Links)", monthYearText: "Monat auswählen (Strg/Control + Hoch/Runter, um ein Jahr auszuwählen)", todayTip: "Heute ({0}) (Leertaste)", format: "d.m.Y", startDay: 1 }); Ext.define("Ext.locale.de.picker.Month", { override: "Ext.picker.Month", okText: "&#160;OK&#160;", cancelText: "Abbrechen" }); Ext.define("Ext.locale.de.toolbar.Paging", { override: "Ext.PagingToolbar", beforePageText: "Seite", afterPageText: "von {0}", firstText: "Erste Seite", prevText: "vorherige Seite", nextText: "nächste Seite", lastText: "letzte Seite", refreshText: "Aktualisieren", displayMsg: "Anzeige Eintrag {0} - {1} von {2}", emptyMsg: "Keine Daten vorhanden" }); Ext.define("Ext.locale.de.form.field.Text", { override: "Ext.form.field.Text", minLengthText: "Bitte geben Sie mindestens {0} Zeichen ein", maxLengthText: "Bitte geben Sie maximal {0} Zeichen ein", blankText: "Dieses Feld darf nicht leer sein", regexText: "", emptyText: null }); Ext.define("Ext.locale.de.form.field.Number", { override: "Ext.form.field.Number", minText: "Der Mindestwert für dieses Feld ist {0}", maxText: "Der Maximalwert für dieses Feld ist {0}", nanText: "{0} ist keine Zahl", decimalSeparator: "," }); Ext.define("Ext.locale.de.form.field.Date", { override: "Ext.form.field.Date", disabledDaysText: "nicht erlaubt", disabledDatesText: "nicht erlaubt", minText: "Das Datum in diesem Feld muss nach dem {0} liegen", maxText: "Das Datum in diesem Feld muss vor dem {0} liegen", invalidText: "{0} ist kein gültiges Datum - es muss im Format {1} eingegeben werden", format: "d.m.Y", altFormats: "j.n.Y|j.n.y|j.n.|j.|j/n/Y|j/n/y|j-n-y|j-n-Y|j/n|j-n|dm|dmy|dmY|j|Y-n-j" }); Ext.define("Ext.locale.de.form.field.ComboBox", { override: "Ext.form.field.ComboBox", valueNotFoundText: undefined }, function() { Ext.apply(Ext.form.field.ComboBox.prototype.defaultListConfig, { loadingText: "Lade Daten ..." }); }); if (exists('Ext.form.field.VTypes')) { Ext.apply(Ext.form.field.VTypes, { emailText: 'Dieses Feld sollte eine E-Mail-Adresse enthalten. Format: "user@example.com"', urlText: 'Dieses Feld sollte eine URL enthalten. Format: "http:/' + '/www.example.com"', alphaText: 'Dieses Feld darf nur Buchstaben enthalten und _', alphanumText: 'Dieses Feld darf nur Buchstaben und Zahlen enthalten und _' }); } Ext.define("Ext.locale.de.form.field.HtmlEditor", { override: "Ext.form.field.HtmlEditor", createLinkText: 'Bitte geben Sie die URL für den Link ein:' }, function() { Ext.apply(Ext.form.field.HtmlEditor.prototype, { buttonTips: { bold: { title: 'Fett (Ctrl+B)', text: 'Erstellt den ausgewählten Text in Fettschrift.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, italic: { title: 'Kursiv (Ctrl+I)', text: 'Erstellt den ausgewählten Text in Schrägschrift.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, underline: { title: 'Unterstrichen (Ctrl+U)', text: 'Unterstreicht den ausgewählten Text.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, increasefontsize: { title: 'Text vergößern', text: 'Erhöht die Schriftgröße.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, decreasefontsize: { title: 'Text verkleinern', text: 'Verringert die Schriftgröße.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, backcolor: { title: 'Text farblich hervorheben', text: 'Hintergrundfarbe des ausgewählten Textes ändern.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, forecolor: { title: 'Schriftfarbe', text: 'Farbe des ausgewählten Textes ändern.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, justifyleft: { title: 'Linksbündig', text: 'Setzt den Text linksbündig.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, justifycenter: { title: 'Zentrieren', text: 'Zentriert den Text in Editor.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, justifyright: { title: 'Rechtsbündig', text: 'Setzt den Text rechtsbündig.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, insertunorderedlist: { title: 'Aufzählungsliste', text: 'Beginnt eine Aufzählungsliste mit Spiegelstrichen.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, insertorderedlist: { title: 'Numerierte Liste', text: 'Beginnt eine numerierte Liste.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, createlink: { title: 'Hyperlink', text: 'Erstellt einen Hyperlink aus dem ausgewählten text.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, sourceedit: { title: 'Source bearbeiten', text: 'Zur Bearbeitung des Quelltextes wechseln.', cls: Ext.baseCSSPrefix + 'html-editor-tip' } } }); }); Ext.define("Ext.locale.de.grid.header.Container", { override: "Ext.grid.header.Container", sortAscText: "Aufsteigend sortieren", sortDescText: "Absteigend sortieren", lockText: "Spalte sperren", unlockText: "Spalte freigeben (entsperren)", columnsText: "Spalten" }); Ext.define("Ext.locale.de.grid.GroupingFeature", { override: "Ext.grid.GroupingFeature", emptyGroupText: '(Keine)', groupByText: 'Dieses Feld gruppieren', showGroupsText: 'In Gruppen anzeigen' }); Ext.define("Ext.locale.de.grid.PropertyColumnModel", { override: "Ext.grid.PropertyColumnModel", nameText: "Name", valueText: "Wert", dateFormat: "d.m.Y" }); Ext.define("Ext.locale.de.grid.BooleanColumn", { override: "Ext.grid.BooleanColumn", trueText: "wahr", falseText: "falsch" }); Ext.define("Ext.locale.de.grid.NumberColumn", { override: "Ext.grid.NumberColumn", format: '0.000,00/i' }); Ext.define("Ext.locale.de.grid.DateColumn", { override: "Ext.grid.DateColumn", format: 'd.m.Y' }); Ext.define("Ext.locale.de.form.field.Time", { override: "Ext.form.field.Time", minText: "Die Zeit muss gleich oder nach {0} liegen", maxText: "Die Zeit muss gleich oder vor {0} liegen", invalidText: "{0} ist keine gültige Zeit", format: "H:i" }); Ext.define("Ext.locale.de.form.CheckboxGroup", { override: "Ext.form.CheckboxGroup", blankText: "Du mußt mehr als einen Eintrag aus der Gruppe auswählen" }); Ext.define("Ext.locale.de.form.RadioGroup", { override: "Ext.form.RadioGroup", blankText: "Du mußt einen Eintrag aus der Gruppe auswählen" }); });
JavaScript
/** * Polish Translations * By vbert 17-April-2007 * Updated by mmar 16-November-2007 * Encoding: utf-8 */ Ext.onReady(function() { var cm = Ext.ClassManager, exists = Ext.Function.bind(cm.get, cm); if (Ext.Updater) { Ext.Updater.defaults.indicatorText = '<div class="loading-indicator">Wczytywanie danych...</div>'; } Ext.define("Ext.locale.pl.view.View", { override: "Ext.view.View", emptyText: "" }); Ext.define("Ext.locale.pl.grid.Panel", { override: "Ext.grid.Panel", ddText: "{0} wybrano wiersze(y)" }); Ext.define("Ext.locale.pl.TabPanelItem", { override: "Ext.TabPanelItem", closeText: "Zamknij zakładkę" }); Ext.define("Ext.locale.pl.form.field.Base", { override: "Ext.form.field.Base", invalidText: "Wartość tego pola jest niewłaściwa" }); // changing the msg text below will affect the LoadMask Ext.define("Ext.locale.pl.view.AbstractView", { override: "Ext.view.AbstractView", msg: "Wczytywanie danych..." }); if (Ext.Date) { Ext.Date.monthNames = ["Styczeń", "Luty", "Marzec", "Kwiecień", "Maj", "Czerwiec", "Lipiec", "Sierpień", "Wrzesień", "Październik", "Listopad", "Grudzień"]; Ext.Date.getShortMonthName = function(month) { return Ext.Date.monthNames[month].substring(0, 3); }; Ext.Date.monthNumbers = { Sty: 0, Lut: 1, Mar: 2, Kwi: 3, Maj: 4, Cze: 5, Lip: 6, Sie: 7, Wrz: 8, Paź: 9, Lis: 10, Gru: 11 }; Ext.Date.getMonthNumber = function(name) { return Ext.Date.monthNumbers[name.substring(0, 1).toUpperCase() + name.substring(1, 3).toLowerCase()]; }; Ext.Date.dayNames = ["Niedziela", "Poniedziałek", "Wtorek", "Środa", "Czwartek", "Piątek", "Sobota"]; Ext.Date.getShortDayName = function(day) { switch (day) { case 0: return 'ndz'; case 1: return 'pon'; case 2: return 'wt'; case 3: return 'śr'; case 4: return 'czw'; case 5: return 'pt'; case 6: return 'sob'; default: return ''; } }; } if (Ext.MessageBox) { Ext.MessageBox.buttonText = { ok: "OK", cancel: "Anuluj", yes: "Tak", no: "Nie" }; } if (exists('Ext.util.Format')) { Ext.apply(Ext.util.Format, { thousandSeparator: '.', decimalSeparator: ',', currencySign: '\u007a\u0142', // Polish Zloty dateFormat: 'Y-m-d' }); } Ext.define("Ext.locale.pl.picker.Date", { override: "Ext.picker.Date", startDay: 1, todayText: "Dzisiaj", minText: "Data jest wcześniejsza od daty minimalnej", maxText: "Data jest późniejsza od daty maksymalnej", disabledDaysText: "", disabledDatesText: "", monthNames: Ext.Date.monthNames, dayNames: Ext.Date.dayNames, nextText: "Następny miesiąc (Control+StrzałkaWPrawo)", prevText: "Poprzedni miesiąc (Control+StrzałkaWLewo)", monthYearText: "Wybierz miesiąc (Control+Up/Down aby zmienić rok)", todayTip: "{0} (Spacja)", format: "Y-m-d", startDay: 1 }); Ext.define("Ext.locale.pl.picker.Month", { override: "Ext.picker.Month", okText: "&#160;OK&#160;", cancelText: "Anuluj" }); Ext.define("Ext.locale.pl.toolbar.Paging", { override: "Ext.PagingToolbar", beforePageText: "Strona", afterPageText: "z {0}", firstText: "Pierwsza strona", prevText: "Poprzednia strona", nextText: "Następna strona", lastText: "Ostatnia strona", refreshText: "Odśwież", displayMsg: "Wyświetlono {0} - {1} z {2}", emptyMsg: "Brak danych do wyświetlenia" }); Ext.define("Ext.locale.pl.form.field.Text", { override: "Ext.form.field.Text", minLengthText: "Minimalna ilość znaków dla tego pola to {0}", maxLengthText: "Maksymalna ilość znaków dla tego pola to {0}", blankText: "To pole jest wymagane", regexText: "", emptyText: null }); Ext.define("Ext.locale.pl.form.field.Number", { override: "Ext.form.field.Number", minText: "Minimalna wartość dla tego pola to {0}", maxText: "Maksymalna wartość dla tego pola to {0}", nanText: "{0} to nie jest właściwa wartość" }); Ext.define("Ext.locale.pl.form.field.Date", { override: "Ext.form.field.Date", disabledDaysText: "Wyłączony", disabledDatesText: "Wyłączony", minText: "Data w tym polu musi być późniejsza od {0}", maxText: "Data w tym polu musi być wcześniejsza od {0}", invalidText: "{0} to nie jest prawidłowa data - prawidłowy format daty {1}", format: "Y-m-d", altFormats: "m/d/Y|m-d-y|m-d-Y|m/d|m-d|md|mdy|mdY|d|Y-m-d" }); Ext.define("Ext.locale.pl.form.field.ComboBox", { override: "Ext.form.field.ComboBox", valueNotFoundText: undefined }, function() { Ext.apply(Ext.form.field.ComboBox.prototype.defaultListConfig, { loadingText: "Wczytuję..." }); }); if (exists('Ext.form.field.VTypes')) { Ext.apply(Ext.form.field.VTypes, { emailText: 'To pole wymaga podania adresu e-mail w formacie: "nazwa@domena.pl"', urlText: 'To pole wymaga podania adresu strony www w formacie: "http:/' + '/www.domena.pl"', alphaText: 'To pole wymaga podania tylko liter i _', alphanumText: 'To pole wymaga podania tylko liter, cyfr i _' }); } Ext.define("Ext.locale.pl.form.field.HtmlEditor", { override: "Ext.form.field.HtmlEditor", createLinkText: 'Wprowadź adres URL strony:' }, function() { Ext.apply(Ext.form.field.HtmlEditor.prototype, { buttonTips: { bold: { title: 'Pogrubienie (Ctrl+B)', text: 'Ustaw styl zaznaczonego tekstu na pogrubiony.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, italic: { title: 'Kursywa (Ctrl+I)', text: 'Ustaw styl zaznaczonego tekstu na kursywę.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, underline: { title: 'Podkreślenie (Ctrl+U)', text: 'Podkreśl zaznaczony tekst.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, increasefontsize: { title: 'Zwiększ czcionkę', text: 'Zwiększ rozmiar czcionki.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, decreasefontsize: { title: 'Zmniejsz czcionkę', text: 'Zmniejsz rozmiar czcionki.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, backcolor: { title: 'Wyróżnienie', text: 'Zmień kolor wyróżnienia zaznaczonego tekstu.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, forecolor: { title: 'Kolor czcionki', text: 'Zmień kolor zaznaczonego tekstu.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, justifyleft: { title: 'Do lewej', text: 'Wyrównaj tekst do lewej.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, justifycenter: { title: 'Wyśrodkuj', text: 'Wyrównaj tekst do środka.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, justifyright: { title: 'Do prawej', text: 'Wyrównaj tekst do prawej.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, insertunorderedlist: { title: 'Lista wypunktowana', text: 'Rozpocznij listę wypunktowaną.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, insertorderedlist: { title: 'Lista numerowana', text: 'Rozpocznij listę numerowaną.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, createlink: { title: 'Hiperłącze', text: 'Przekształć zaznaczony tekst w hiperłącze.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, sourceedit: { title: 'Edycja źródła', text: 'Przełącz w tryb edycji źródła.', cls: Ext.baseCSSPrefix + 'html-editor-tip' } } }); }); Ext.define("Ext.locale.pl.grid.header.Container", { override: "Ext.grid.header.Container", sortAscText: "Sortuj rosnąco", sortDescText: "Sortuj malejąco", lockText: "Zablokuj kolumnę", unlockText: "Odblokuj kolumnę", columnsText: "Kolumny" }); Ext.define("Ext.locale.pl.grid.GroupingFeature", { override: "Ext.grid.GroupingFeature", emptyGroupText: '(None)', groupByText: 'Grupuj po tym polu', showGroupsText: 'Pokaż w grupach' }); Ext.define("Ext.locale.pl.grid.PropertyColumnModel", { override: "Ext.grid.PropertyColumnModel", nameText: "Nazwa", valueText: "Wartość", dateFormat: "Y-m-d" }); });
JavaScript
/** * Portuguese/Brazil Translation by Weber Souza * 08 April 2007 * Updated by Allan Brazute Alves (EthraZa) * 06 September 2007 * Updated by Leonardo Lima * 05 March 2008 * Updated by Juliano Tarini (jtarini) * 22 April 2008 */ Ext.onReady(function() { var cm = Ext.ClassManager, exists = Ext.Function.bind(cm.get, cm); if (Ext.Updater) { Ext.Updater.defaults.indicatorText = '<div class="loading-indicator">Carregando...</div>'; } Ext.define("Ext.locale.pt_BR.view.View", { override: "Ext.view.View", emptyText: "" }); Ext.define("Ext.locale.pt_BR.grid.Panel", { override: "Ext.grid.Panel", ddText: "{0} linha(s) selecionada(s)" }); Ext.define("Ext.locale.pt_BR.TabPanelItem", { override: "Ext.TabPanelItem", closeText: "Fechar" }); Ext.define("Ext.locale.pt_BR.form.field.Base", { override: "Ext.form.field.Base", invalidText: "O valor para este campo &eacute; inv&aacute;lido" }); // changing the msg text below will affect the LoadMask Ext.define("Ext.locale.pt_BR.view.AbstractView", { override: "Ext.view.AbstractView", msg: "Carregando..." }); if (Ext.Date) { Ext.Date.monthNames = ["Janeiro", "Fevereiro", "Mar&ccedil;o", "Abril", "Maio", "Junho", "Julho", "Agosto", "Setembro", "Outubro", "Novembro", "Dezembro"]; Ext.Date.getShortMonthName = function(month) { return Ext.Date.monthNames[month].substring(0, 3); }; Ext.Date.monthNumbers = { Jan: 0, Fev: 1, Mar: 2, Abr: 3, Mai: 4, Jun: 5, Jul: 6, Ago: 7, Set: 8, Out: 9, Nov: 10, Dez: 11 }; Ext.Date.getMonthNumber = function(name) { return Ext.Date.monthNumbers[name.substring(0, 1).toUpperCase() + name.substring(1, 3).toLowerCase()]; }; Ext.Date.dayNames = ["Domingo", "Segunda", "Ter&ccedil;a", "Quarta", "Quinta", "Sexta", "S&aacute;bado"]; } if (Ext.MessageBox) { Ext.MessageBox.buttonText = { ok: "OK", cancel: "Cancelar", yes: "Sim", no: "N&atilde;o" }; } if (exists('Ext.util.Format')) { Ext.apply(Ext.util.Format, { thousandSeparator: ',', decimalSeparator: '.', currencySign: 'R$', // Brazilian Real dateFormat: 'd/m/Y' }); Ext.util.Format.brMoney = Ext.util.Format.currency; } Ext.define("Ext.locale.pt_BR.picker.Date", { override: "Ext.picker.Date", todayText: "Hoje", minText: "Esta data &eacute; anterior a menor data", maxText: "Esta data &eacute; posterior a maior data", disabledDaysText: "", disabledDatesText: "", monthNames: Ext.Date.monthNames, dayNames: Ext.Date.dayNames, nextText: 'Pr&oacute;ximo M&ecirc;s (Control+Direita)', prevText: 'M&ecirc;s Anterior (Control+Esquerda)', monthYearText: 'Escolha um M&ecirc;s (Control+Cima/Baixo para mover entre os anos)', todayTip: "{0} (Espa&ccedil;o)", format: "d/m/Y", startDay: 0 }); Ext.define("Ext.locale.pt_BR.picker.Month", { override: "Ext.picker.Month", okText: "&#160;OK&#160;", cancelText: "Cancelar" }); Ext.define("Ext.locale.pt_BR.toolbar.Paging", { override: "Ext.PagingToolbar", beforePageText: "P&aacute;gina", afterPageText: "de {0}", firstText: "Primeira P&aacute;gina", prevText: "P&aacute;gina Anterior", nextText: "Pr&oacute;xima P&aacute;gina", lastText: "&Uacute;ltima P&aacute;gina", refreshText: "Atualizar", displayMsg: "<b>{0} &agrave; {1} de {2} registro(s)</b>", emptyMsg: 'Sem registros para exibir' }); Ext.define("Ext.locale.pt_BR.form.field.Text", { override: "Ext.form.field.Text", minLengthText: "O tamanho m&iacute;nimo para este campo &eacute; {0}", maxLengthText: "O tamanho m&aacute;ximo para este campo &eacute; {0}", blankText: "Este campo &eacute; obrigat&oacute;rio.", regexText: "", emptyText: null }); Ext.define("Ext.locale.pt_BR.form.field.Number", { override: "Ext.form.field.Number", minText: "O valor m&iacute;nimo para este campo &eacute; {0}", maxText: "O valor m&aacute;ximo para este campo &eacute; {0}", nanText: "{0} n&atilde;o &eacute; um n&uacute;mero v&aacute;lido" }); Ext.define("Ext.locale.pt_BR.form.field.Date", { override: "Ext.form.field.Date", disabledDaysText: "Desabilitado", disabledDatesText: "Desabilitado", minText: "A data deste campo deve ser posterior a {0}", maxText: "A data deste campo deve ser anterior a {0}", invalidText: "{0} n&atilde;o &eacute; uma data v&aacute;lida - deve ser informado no formato {1}", format: "d/m/Y" }); Ext.define("Ext.locale.pt_BR.form.field.ComboBox", { override: "Ext.form.field.ComboBox", valueNotFoundText: undefined }, function() { Ext.apply(Ext.form.field.ComboBox.prototype.defaultListConfig, { loadingText: "Carregando..." }); }); if (exists('Ext.form.field.VTypes')) { Ext.apply(Ext.form.field.VTypes, { emailText: 'Este campo deve ser um endere&ccedil;o de e-mail v&aacute;lido, no formato "usuario@dominio.com.br"', urlText: 'Este campo deve ser uma URL no formato "http:/' + '/www.dominio.com.br"', alphaText: 'Este campo deve conter apenas letras e _', alphanumText: 'Este campo deve conter apenas letras, n&uacute;meros e _' }); } Ext.define("Ext.locale.pt_BR.form.field.HtmlEditor", { override: "Ext.form.field.HtmlEditor", createLinkText: 'Por favor, entre com a URL do link:' }, function() { Ext.apply(Ext.form.field.HtmlEditor.prototype, { buttonTips: { bold: { title: 'Negrito (Ctrl+B)', text: 'Deixa o texto selecionado em negrito.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, italic: { title: 'It&aacute;lico (Ctrl+I)', text: 'Deixa o texto selecionado em it&aacute;lico.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, underline: { title: 'Sublinhado (Ctrl+U)', text: 'Sublinha o texto selecionado.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, increasefontsize: { title: 'Aumentar Texto', text: 'Aumenta o tamanho da fonte.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, decreasefontsize: { title: 'Diminuir Texto', text: 'Diminui o tamanho da fonte.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, backcolor: { title: 'Cor de Fundo', text: 'Muda a cor do fundo do texto selecionado.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, forecolor: { title: 'Cor da Fonte', text: 'Muda a cor do texto selecionado.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, justifyleft: { title: 'Alinhar &agrave; Esquerda', text: 'Alinha o texto &agrave; esquerda.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, justifycenter: { title: 'Centralizar Texto', text: 'Centraliza o texto no editor.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, justifyright: { title: 'Alinhar &agrave; Direita', text: 'Alinha o texto &agrave; direita.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, insertunorderedlist: { title: 'Lista com Marcadores', text: 'Inicia uma lista com marcadores.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, insertorderedlist: { title: 'Lista Numerada', text: 'Inicia uma lista numerada.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, createlink: { title: 'Link', text: 'Transforma o texto selecionado em um link.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, sourceedit: { title: 'Editar Fonte', text: 'Troca para o modo de edi&ccedil;&atilde;o de c&oacute;digo fonte.', cls: Ext.baseCSSPrefix + 'html-editor-tip' } } }); }); Ext.define("Ext.locale.pt_BR.grid.header.Container", { override: "Ext.grid.header.Container", sortAscText: "Ordem Ascendente", sortDescText: "Ordem Descendente", lockText: "Bloquear Coluna", unlockText: "Desbloquear Coluna", columnsText: "Colunas" }); Ext.define("Ext.locale.pt_BR.grid.PropertyColumnModel", { override: "Ext.grid.PropertyColumnModel", nameText: "Nome", valueText: "Valor", dateFormat: "d/m/Y" }); });
JavaScript
/** * Swedish translation (utf8-encoding) * By Erik Andersson, Monator Technologies * 24 April 2007 * Changed by Cariad, 29 July 2007 */ Ext.onReady(function() { var cm = Ext.ClassManager, exists = Ext.Function.bind(cm.get, cm); if (Ext.Updater) { Ext.Updater.defaults.indicatorText = '<div class="loading-indicator">Laddar...</div>'; } Ext.define("Ext.locale.sv_SE.view.View", { override: "Ext.view.View", emptyText: "" }); Ext.define("Ext.locale.sv_SE.grid.Panel", { override: "Ext.grid.Panel", ddText: "{0} markerade rad(er)" }); Ext.define("Ext.locale.sv_SE.TabPanelItem", { override: "Ext.TabPanelItem", closeText: "Stäng denna flik" }); Ext.define("Ext.locale.sv_SE.form.field.Base", { override: "Ext.form.field.Base", invalidText: "Värdet i detta fält är inte tillåtet" }); // changing the msg text below will affect the LoadMask Ext.define("Ext.locale.sv_SE.view.AbstractView", { override: "Ext.view.AbstractView", msg: "Laddar..." }); if (Ext.Date) { Ext.Date.monthNames = ["januari", "februari", "mars", "april", "maj", "juni", "juli", "augusti", "september", "oktober", "november", "december"]; Ext.Date.dayNames = ["söndag", "måndag", "tisdag", "onsdag", "torsdag", "fredag", "lördag"]; } if (Ext.MessageBox) { Ext.MessageBox.buttonText = { ok: "OK", cancel: "Avbryt", yes: "Ja", no: "Nej" }; } if (exists('Ext.util.Format')) { Ext.apply(Ext.util.Format, { thousandSeparator: '.', decimalSeparator: ',', currencySign: 'kr', // Swedish Krone dateFormat: 'Y-m-d' }); } Ext.define("Ext.locale.sv_SE.picker.Date", { override: "Ext.picker.Date", todayText: "Idag", minText: "Detta datum inträffar före det tidigast tillåtna", maxText: "Detta datum inträffar efter det senast tillåtna", disabledDaysText: "", disabledDatesText: "", monthNames: Ext.Date.monthNames, dayNames: Ext.Date.dayNames, nextText: 'Nästa månad (Ctrl + högerpil)', prevText: 'Föregående månad (Ctrl + vänsterpil)', monthYearText: 'Välj en månad (Ctrl + uppåtpil/neråtpil för att ändra årtal)', todayTip: "{0} (mellanslag)", format: "Y-m-d", startDay: 1 }); Ext.define("Ext.locale.sv_SE.toolbar.Paging", { override: "Ext.PagingToolbar", beforePageText: "Sida", afterPageText: "av {0}", firstText: "Första sidan", prevText: "Föregående sida", nextText: "Nästa sida", lastText: "Sista sidan", refreshText: "Uppdatera", displayMsg: "Visar {0} - {1} av {2}", emptyMsg: 'Det finns ingen data att visa' }); Ext.define("Ext.locale.sv_SE.form.field.Text", { override: "Ext.form.field.Text", minLengthText: "Minsta tillåtna längd för detta fält är {0}", maxLengthText: "Största tillåtna längd för detta fält är {0}", blankText: "Detta fält är obligatoriskt", regexText: "", emptyText: null }); Ext.define("Ext.locale.sv_SE.form.field.Number", { override: "Ext.form.field.Number", minText: "Minsta tillåtna värde för detta fält är {0}", maxText: "Största tillåtna värde för detta fält är {0}", nanText: "{0} är inte ett tillåtet nummer" }); Ext.define("Ext.locale.sv_SE.form.field.Date", { override: "Ext.form.field.Date", disabledDaysText: "Inaktiverad", disabledDatesText: "Inaktiverad", minText: "Datumet i detta fält måste inträffa efter {0}", maxText: "Datumet i detta fält måste inträffa före {0}", invalidText: "{0} är inte ett tillåtet datum - datum ska anges i formatet {1}", format: "Y-m-d" }); Ext.define("Ext.locale.sv_SE.form.field.ComboBox", { override: "Ext.form.field.ComboBox", valueNotFoundText: undefined }, function() { Ext.apply(Ext.form.field.ComboBox.prototype.defaultListConfig, { loadingText: "Laddar..." }); }); if (exists('Ext.form.field.VTypes')) { Ext.apply(Ext.form.field.VTypes, { emailText: 'Detta fält ska innehålla en e-post adress i formatet "användare@domän.se"', urlText: 'Detta fält ska innehålla en länk (URL) i formatet "http:/' + '/www.domän.se"', alphaText: 'Detta fält får bara innehålla bokstäver och "_"', alphanumText: 'Detta fält får bara innehålla bokstäver, nummer och "_"' }); } Ext.define("Ext.locale.sv_SE.grid.header.Container", { override: "Ext.grid.header.Container", sortAscText: "Sortera stigande", sortDescText: "Sortera fallande", lockText: "Lås kolumn", unlockText: "Lås upp kolumn", columnsText: "Kolumner" }); Ext.define("Ext.locale.sv_SE.grid.PropertyColumnModel", { override: "Ext.grid.PropertyColumnModel", nameText: "Namn", valueText: "Värde", dateFormat: "Y-m-d" }); });
JavaScript
/** * Simplified Chinese translation * By DavidHu * 09 April 2007 * * update by andy_ghg * 2009-10-22 15:00:57 */ Ext.onReady(function() { var cm = Ext.ClassManager, exists = Ext.Function.bind(cm.get, cm), parseCodes; if (Ext.Updater) { Ext.Updater.defaults.indicatorText = '<div class="loading-indicator">加载中...</div>'; } Ext.define("Ext.locale.zh_CN.view.View", { override: "Ext.view.View", emptyText: "" }); Ext.define("Ext.locale.zh_CN.grid.Panel", { override: "Ext.grid.Panel", ddText: "选择了 {0} 行" }); Ext.define("Ext.locale.zh_CN.TabPanelItem", { override: "Ext.TabPanelItem", closeText: "关闭此标签" }); Ext.define("Ext.locale.zh_CN.form.field.Base", { override: "Ext.form.field.Base", invalidText: "输入值非法" }); // changing the msg text below will affect the LoadMask Ext.define("Ext.locale.zh_CN.view.AbstractView", { override: "Ext.view.AbstractView", msg: "讀取中..." }); if (Ext.Date) { Ext.Date.monthNames = ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"]; Ext.Date.dayNames = ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"]; Ext.Date.formatCodes.a = "(this.getHours() < 12 ? '上午' : '下午')"; Ext.Date.formatCodes.A = "(this.getHours() < 12 ? '上午' : '下午')"; parseCodes = { g: 1, c: "if (/(上午)/i.test(results[{0}])) {\n" + "if (!h || h == 12) { h = 0; }\n" + "} else { if (!h || h < 12) { h = (h || 0) + 12; }}", s: "(上午|下午)", calcAtEnd: true }; Ext.Date.parseCodes.a = Ext.Date.parseCodes.A = parseCodes; } if (Ext.MessageBox) { Ext.MessageBox.buttonText = { ok: "确定", cancel: "取消", yes: "是", no: "否" }; } if (exists('Ext.util.Format')) { Ext.apply(Ext.util.Format, { thousandSeparator: ',', decimalSeparator: '.', currencySign: '\u00a5', // Chinese Yuan dateFormat: 'y年m月d日' }); } Ext.define("Ext.locale.zh_CN.picker.Date", { override: "Ext.picker.Date", todayText: "今天", minText: "日期必须大于最小允许日期", //update maxText: "日期必须小于最大允许日期", //update disabledDaysText: "", disabledDatesText: "", monthNames: Ext.Date.monthNames, dayNames: Ext.Date.dayNames, nextText: '下个月 (Ctrl+Right)', prevText: '上个月 (Ctrl+Left)', monthYearText: '选择一个月 (Control+Up/Down 来改变年份)', //update todayTip: "{0} (空格键选择)", format: "y年m月d日", ariaTitle: '{0}', ariaTitleDateFormat: 'Y\u5e74m\u6708d\u65e5', longDayFormat: 'Y\u5e74m\u6708d\u65e5', monthYearFormat: 'Y\u5e74m\u6708', getDayInitial: function (value) { // Grab the last character return value.substr(value.length - 1); } }); Ext.define("Ext.locale.zh_CN.picker.Month", { override: "Ext.picker.Month", okText: "确定", cancelText: "取消" }); Ext.define("Ext.locale.zh_CN.toolbar.Paging", { override: "Ext.PagingToolbar", beforePageText: "第", //update afterPageText: "页,共 {0} 页", //update firstText: "第一页", prevText: "上一页", //update nextText: "下一页", lastText: "最后页", refreshText: "刷新", displayMsg: "显示 {0} - {1}条,共 {2} 条", //update emptyMsg: '没有数据' }); Ext.define("Ext.locale.zh_CN.form.field.Text", { override: "Ext.form.field.Text", minLengthText: "该输入项的最小长度是 {0} 个字符", maxLengthText: "该输入项的最大长度是 {0} 个字符", blankText: "该输入项为必输项", regexText: "", emptyText: null }); Ext.define("Ext.locale.zh_CN.form.field.Number", { override: "Ext.form.field.Number", minText: "该输入项的最小值是 {0}", maxText: "该输入项的最大值是 {0}", nanText: "{0} 不是有效数值" }); Ext.define("Ext.locale.zh_CN.form.field.Date", { override: "Ext.form.field.Date", disabledDaysText: "禁用", disabledDatesText: "禁用", minText: "该输入项的日期必须在 {0} 之后", maxText: "该输入项的日期必须在 {0} 之前", invalidText: "{0} 是无效的日期 - 必须符合格式: {1}", format: "y年m月d日" }); Ext.define("Ext.locale.zh_CN.form.field.ComboBox", { override: "Ext.form.field.ComboBox", valueNotFoundText: undefined }, function() { Ext.apply(Ext.form.field.ComboBox.prototype.defaultListConfig, { loadingText: "加载中..." }); }); if (exists('Ext.form.field.VTypes')) { Ext.apply(Ext.form.field.VTypes, { emailText: '该输入项必须是电子邮件地址,格式如: "user@example.com"', urlText: '该输入项必须是URL地址,格式如: "http:/' + '/www.example.com"', alphaText: '该输入项只能包含半角字母和_', //update alphanumText: '该输入项只能包含半角字母,数字和_' //update }); } //add HTMLEditor's tips by andy_ghg Ext.define("Ext.locale.zh_CN.form.field.HtmlEditor", { override: "Ext.form.field.HtmlEditor", createLinkText: '添加超级链接:' }, function() { Ext.apply(Ext.form.field.HtmlEditor.prototype, { buttonTips: { bold: { title: '粗体 (Ctrl+B)', text: '将选中的文字设置为粗体', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, italic: { title: '斜体 (Ctrl+I)', text: '将选中的文字设置为斜体', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, underline: { title: '下划线 (Ctrl+U)', text: '给所选文字加下划线', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, increasefontsize: { title: '增大字体', text: '增大字号', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, decreasefontsize: { title: '缩小字体', text: '减小字号', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, backcolor: { title: '以不同颜色突出显示文本', text: '使文字看上去像是用荧光笔做了标记一样', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, forecolor: { title: '字体颜色', text: '更改字体颜色', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, justifyleft: { title: '左对齐', text: '将文字左对齐', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, justifycenter: { title: '居中', text: '将文字居中对齐', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, justifyright: { title: '右对齐', text: '将文字右对齐', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, insertunorderedlist: { title: '项目符号', text: '开始创建项目符号列表', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, insertorderedlist: { title: '编号', text: '开始创建编号列表', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, createlink: { title: '转成超级链接', text: '将所选文本转换成超级链接', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, sourceedit: { title: '代码视图', text: '以代码的形式展现文本', cls: Ext.baseCSSPrefix + 'html-editor-tip' } } }); }); Ext.define("Ext.locale.zh_CN.grid.header.Container", { override: "Ext.grid.header.Container", sortAscText: "正序", //update sortDescText: "倒序", //update lockText: "锁定列", //update unlockText: "解除锁定", //update columnsText: "列" }); Ext.define("Ext.locale.zh_CN.grid.PropertyColumnModel", { override: "Ext.grid.PropertyColumnModel", nameText: "名称", valueText: "值", dateFormat: "y年m月d日" }); });
JavaScript
/** * Bulgarian Translation * * By Георги Костадинов, Калгари, Канада * 10 October 2007 * By Nedko Penev * 26 October 2007 * * (utf-8 encoding) */ Ext.onReady(function() { var cm = Ext.ClassManager, exists = Ext.Function.bind(cm.get, cm); if (Ext.Updater) { Ext.Updater.defaults.indicatorText = '<div class="loading-indicator">Зареждане...</div>'; } Ext.define("Ext.locale.bg.view.View", { override: "Ext.view.View", emptyText: "" }); Ext.define("Ext.locale.bg.grid.Panel", { override: "Ext.grid.Panel", ddText: "{0} избрани колони" }); Ext.define("Ext.locale.bg.TabPanelItem", { override: "Ext.TabPanelItem", closeText: "Затвори таб" }); Ext.define("Ext.locale.bg.form.field.Base", { override: "Ext.form.field.Base", invalidText: "Невалидна стойност на полето" }); // changing the msg text below will affect the LoadMask Ext.define("Ext.locale.bg.view.AbstractView", { override: "Ext.view.AbstractView", msg: "Зареждане..." }); if (Ext.Date) { Ext.Date.monthNames = ["Януари", "Февруари", "Март", "Април", "Май", "Юни", "Юли", "Август", "Септември", "Октомври", "Ноември", "Декември"]; Ext.Date.monthNumbers = { Jan: 0, Feb: 1, Mar: 2, Apr: 3, May: 4, Jun: 5, Jul: 6, Aug: 7, Sep: 8, Oct: 9, Nov: 10, Dec: 11 }; Ext.Date.dayNames = ["Неделя", "Понеделник", "Вторник", "Сряда", "Четвъртък", "Петък", "Събота"]; } if (Ext.MessageBox) { Ext.MessageBox.buttonText = { ok: "OK", cancel: "Отмени", yes: "Да", no: "Не" }; } if (exists('Ext.util.Format')) { Ext.apply(Ext.util.Format, { thousandSeparator: '.', decimalSeparator: ',', currencySign: '\u043b\u0432', // Bulgarian Leva dateFormat: 'd.m.Y' }); } Ext.define("Ext.locale.bg.picker.Date", { override: "Ext.picker.Date", todayText: "Днес", minText: "Тази дата е преди минималната", maxText: "Тази дата е след максималната", disabledDaysText: "", disabledDatesText: "", monthNames: Ext.Date.monthNames, dayNames: Ext.Date.dayNames, nextText: 'Следващ месец (Control+Right)', prevText: 'Предишен месец (Control+Left)', monthYearText: 'Избери месец (Control+Up/Down за преместване по години)', todayTip: "{0} (Spacebar)", format: "d.m.y", startDay: 1 }); Ext.define("Ext.locale.bg.picker.Month", { override: "Ext.picker.Month", okText: "&#160;OK&#160;", cancelText: "Отмени" }); Ext.define("Ext.locale.bg.toolbar.Paging", { override: "Ext.PagingToolbar", beforePageText: "Страница", afterPageText: "от {0}", firstText: "Първа страница", prevText: "Предишна страница", nextText: "Следваща страница", lastText: "Последна страница", refreshText: "Презареди", displayMsg: "Показвайки {0} - {1} от {2}", emptyMsg: 'Няма данни за показване' }); Ext.define("Ext.locale.bg.form.field.Text", { override: "Ext.form.field.Text", minLengthText: "Минималната дължина на това поле е {0}", maxLengthText: "Максималната дължина на това поле е {0}", blankText: "Това поле е задължително", regexText: "", emptyText: null }); Ext.define("Ext.locale.bg.form.field.Number", { override: "Ext.form.field.Number", minText: "Минималната стойност за това поле е {0}", maxText: "Максималната стойност за това поле е {0}", nanText: "{0} не е валидно число" }); Ext.define("Ext.locale.bg.form.field.Date", { override: "Ext.form.field.Date", disabledDaysText: "Недостъпен", disabledDatesText: "Недостъпен", minText: "Датата в това поле трябва да е след {0}", maxText: "Датата в това поле трябва да е преди {0}", invalidText: "{0} не е валидна дата - трябва да бъде във формат {1}", format: "d.m.y", altFormats: "d.m.y|d/m/Y|d-m-y|d-m-Y|d/m|d-m|dm|dmy|dmY|d|Y-m-d" }); Ext.define("Ext.locale.bg.form.field.ComboBox", { override: "Ext.form.field.ComboBox", valueNotFoundText: undefined }, function() { Ext.apply(Ext.form.field.ComboBox.prototype.defaultListConfig, { loadingText: "Зареждане..." }); }); if (exists('Ext.form.field.VTypes')) { Ext.apply(Ext.form.field.VTypes, { emailText: 'Това поле трябва да бъде емейл във формат "user@example.com"', urlText: 'Това поле трябва да бъде URL във формат "http:/' + '/www.example.com"', alphaText: 'Това поле трябва да съдържа само букви и _', alphanumText: 'Това поле трябва да съдържа само букви, цифри и _' }); } Ext.define("Ext.locale.bg.form.field.HtmlEditor", { override: "Ext.form.field.HtmlEditor", createLinkText: 'Моля, въведете URL за връзката:' }, function() { Ext.apply(Ext.form.field.HtmlEditor.prototype, { buttonTips: { bold: { title: 'Bold (Ctrl+B)', text: 'Удебелява избрания текст.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, italic: { title: 'Italic (Ctrl+I)', text: 'Прави избрания текст курсив.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, underline: { title: 'Underline (Ctrl+U)', text: 'Подчертава избрания текст.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, increasefontsize: { title: 'Уголеми текста', text: 'Уголемява размера на шрифта.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, decreasefontsize: { title: 'Намали текста', text: 'Намалява размера на шрифта.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, backcolor: { title: 'Цвят на маркирания текст', text: 'Променя фоновия цвят на избрания текст.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, forecolor: { title: 'Цвят на шрифта', text: 'Променя цвета на избрания текст.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, justifyleft: { title: 'Ляво подравняване', text: 'Подравнява текста на ляво.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, justifycenter: { title: 'Центриране', text: 'Центрира текста.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, justifyright: { title: 'Дясно подравняване', text: 'Подравнява текста на дясно.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, insertunorderedlist: { title: 'Неномериран списък', text: 'Започва неномериран списък.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, insertorderedlist: { title: 'Номериран списък', text: 'Започва номериран списък.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, createlink: { title: 'Хипервръзка', text: 'Превръща избрания текст в хипервръзка.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, sourceedit: { title: 'Редактиране на кода', text: 'Преминаване в режим на редактиране на кода.', cls: Ext.baseCSSPrefix + 'html-editor-tip' } } }); }); Ext.define("Ext.locale.bg.grid.header.Container", { override: "Ext.grid.header.Container", sortAscText: "Подреди в нарастващ ред", sortDescText: "Подреди в намаляващ ред", lockText: "Заключи колона", unlockText: "Отключи колона", columnsText: "Колони" }); Ext.define("Ext.locale.bg.grid.PropertyColumnModel", { override: "Ext.grid.PropertyColumnModel", nameText: "Име", valueText: "Стойност", dateFormat: "d.m.Y" }); });
JavaScript
/** * List compiled by mystix on the extjs.com forums. * Thank you Mystix! * * Dutch Translations * by Ido Sebastiaan Bas van Oostveen (12 Oct 2007) * updated to 2.2 by Condor (8 Aug 2008) */ Ext.onReady(function() { var cm = Ext.ClassManager, exists = Ext.Function.bind(cm.get, cm); if (Ext.Updater) { Ext.Updater.defaults.indicatorText = '<div class="loading-indicator">Bezig met laden...</div>'; } Ext.define("Ext.locale.nl.view.View", { override: "Ext.view.View", emptyText: '' }); Ext.define("Ext.locale.nl.grid.Panel", { override: "Ext.grid.Panel", ddText: '{0} geselecteerde rij(en)' }); // changing the msg text below will affect the LoadMask Ext.define("Ext.locale.nl.view.AbstractView", { override: "Ext.view.AbstractView", msg: 'Bezig met laden...' }); if (Ext.Date) { Ext.Date.monthNames = ['januari', 'februari', 'maart', 'april', 'mei', 'juni', 'juli', 'augustus', 'september', 'oktober', 'november', 'december']; Ext.Date.getShortMonthName = function(month) { if (month == 2) { return 'mrt'; } return Ext.Date.monthNames[month].substring(0, 3); }; Ext.Date.monthNumbers = { jan: 0, feb: 1, mrt: 2, apr: 3, mei: 4, jun: 5, jul: 6, aug: 7, sep: 8, okt: 9, nov: 10, dec: 11 }; Ext.Date.getMonthNumber = function(name) { var sname = name.substring(0, 3).toLowerCase(); if (sname == 'maa') { return 2; } return Ext.Date.monthNumbers[sname]; }; Ext.Date.dayNames = ['zondag', 'maandag', 'dinsdag', 'woensdag', 'donderdag', 'vrijdag', 'zaterdag']; Ext.Date.getShortDayName = function(day) { return Ext.Date.dayNames[day].substring(0, 3); }; Ext.Date.parseCodes.S.s = "(?:ste|e)"; } if (Ext.MessageBox) { Ext.MessageBox.buttonText = { ok: 'OK', cancel: 'Annuleren', yes: 'Ja', no: 'Nee' }; } if (exists('Ext.util.Format')) { Ext.apply(Ext.util.Format, { thousandSeparator: '.', decimalSeparator: ',', currencySign: '\u20ac', // Dutch Euro dateFormat: 'j-m-Y' }); } Ext.define("Ext.locale.nl.picker.Date", { override: "Ext.picker.Date", todayText: 'Vandaag', minText: 'Deze datum is eerder dan de minimale datum', maxText: 'Deze datum is later dan de maximale datum', disabledDaysText: '', disabledDatesText: '', monthNames: Ext.Date.monthNames, dayNames: Ext.Date.dayNames, nextText: 'Volgende maand (Ctrl+rechts)', prevText: 'Vorige maand (Ctrl+links)', monthYearText: 'Kies een maand (Ctrl+omhoog/omlaag volgend/vorig jaar)', todayTip: '{0} (spatie)', format: 'j-m-y', startDay: 1 }); Ext.define("Ext.locale.nl.picker.Month", { override: "Ext.picker.Month", okText: '&#160;OK&#160;', cancelText: 'Annuleren' }); Ext.define("Ext.locale.nl.toolbar.Paging", { override: "Ext.PagingToolbar", beforePageText: 'Pagina', afterPageText: 'van {0}', firstText: 'Eerste pagina', prevText: 'Vorige pagina', nextText: 'Volgende pagina', lastText: 'Laatste pagina', refreshText: 'Ververs', displayMsg: 'Getoond {0} - {1} van {2}', emptyMsg: 'Geen gegevens om weer te geven' }); Ext.define("Ext.locale.nl.form.field.Base", { override: "Ext.form.field.Base", invalidText: 'De waarde van dit veld is ongeldig' }); Ext.define("Ext.locale.nl.form.field.Text", { override: "Ext.form.field.Text", minLengthText: 'De minimale lengte van dit veld is {0}', maxLengthText: 'De maximale lengte van dit veld is {0}', blankText: 'Dit veld is verplicht', regexText: '', emptyText: null }); Ext.define("Ext.locale.nl.form.field.Number", { override: "Ext.form.field.Number", decimalSeparator: ",", decimalPrecision: 2, minText: 'De minimale waarde van dit veld is {0}', maxText: 'De maximale waarde van dit veld is {0}', nanText: '{0} is geen geldig getal' }); Ext.define("Ext.locale.nl.form.field.Date", { override: "Ext.form.field.Date", disabledDaysText: 'Uitgeschakeld', disabledDatesText: 'Uitgeschakeld', minText: 'De datum in dit veld moet na {0} liggen', maxText: 'De datum in dit veld moet voor {0} liggen', invalidText: '{0} is geen geldige datum - formaat voor datum is {1}', format: 'j-m-y', altFormats: 'd/m/Y|d-m-y|d-m-Y|d/m|d-m|dm|dmy|dmY|d|Y-m-d' }); Ext.define("Ext.locale.nl.form.field.ComboBox", { override: "Ext.form.field.ComboBox", valueNotFoundText: undefined }, function() { Ext.apply(Ext.form.field.ComboBox.prototype.defaultListConfig, { loadingText: 'Bezig met laden...' }); }); if (exists('Ext.form.field.VTypes')) { Ext.apply(Ext.form.field.VTypes, { emailText: 'Dit veld moet een e-mail adres bevatten in het formaat "gebruiker@domein.nl"', urlText: 'Dit veld moet een URL bevatten in het formaat "http:/' + '/www.domein.nl"', alphaText: 'Dit veld mag alleen letters en _ bevatten', alphanumText: 'Dit veld mag alleen letters, cijfers en _ bevatten' }); } Ext.define("Ext.locale.nl.form.field.HtmlEditor", { override: "Ext.form.field.HtmlEditor", createLinkText: 'Vul hier de URL voor de hyperlink in:' }, function() { Ext.apply(Ext.form.field.HtmlEditor.prototype, { buttonTips: { bold: { title: 'Vet (Ctrl+B)', text: 'Maak de geselecteerde tekst vet.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, italic: { title: 'Cursief (Ctrl+I)', text: 'Maak de geselecteerde tekst cursief.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, underline: { title: 'Onderstrepen (Ctrl+U)', text: 'Onderstreep de geselecteerde tekst.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, increasefontsize: { title: 'Tekst vergroten', text: 'Vergroot het lettertype.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, decreasefontsize: { title: 'Tekst verkleinen', text: 'Verklein het lettertype.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, backcolor: { title: 'Tekst achtergrondkleur', text: 'Verander de achtergrondkleur van de geselecteerde tekst.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, forecolor: { title: 'Tekst kleur', text: 'Verander de kleur van de geselecteerde tekst.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, justifyleft: { title: 'Tekst links uitlijnen', text: 'Lijn de tekst links uit.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, justifycenter: { title: 'Tekst centreren', text: 'Centreer de tekst.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, justifyright: { title: 'Tekst rechts uitlijnen', text: 'Lijn de tekst rechts uit.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, insertunorderedlist: { title: 'Opsommingstekens', text: 'Begin een ongenummerde lijst.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, insertorderedlist: { title: 'Genummerde lijst', text: 'Begin een genummerde lijst.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, createlink: { title: 'Hyperlink', text: 'Maak van de geselecteerde tekst een hyperlink.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, sourceedit: { title: 'Bron aanpassen', text: 'Schakel modus over naar bron aanpassen.', cls: Ext.baseCSSPrefix + 'html-editor-tip' } } }); }); Ext.define("Ext.locale.nl.grid.header.Container", { override: "Ext.grid.header.Container", sortAscText: 'Sorteer oplopend', sortDescText: 'Sorteer aflopend', columnsText: 'Kolommen' }); Ext.define("Ext.locale.nl.grid.GroupingFeature", { override: "Ext.grid.GroupingFeature", emptyGroupText: '(Geen)', groupByText: 'Dit veld groeperen', showGroupsText: 'Toon in groepen' }); Ext.define("Ext.locale.nl.grid.PropertyColumnModel", { override: "Ext.grid.PropertyColumnModel", nameText: 'Naam', valueText: 'Waarde', dateFormat: 'j-m-Y' }); Ext.define("Ext.locale.nl.form.field.Time", { override: "Ext.form.field.Time", minText: 'De tijd in dit veld moet op of na {0} liggen', maxText: 'De tijd in dit veld moet op of voor {0} liggen', invalidText: '{0} is geen geldig tijdstip', format: 'G:i', altFormats: 'g:ia|g:iA|g:i a|g:i A|h:i|g:i|H:i|ga|ha|gA|h a|g a|g A|gi|hi|gia|hia|g|H' }); Ext.define("Ext.locale.nl.form.CheckboxGroup", { override: "Ext.form.CheckboxGroup", blankText: 'Selecteer minimaal een element in deze groep' }); Ext.define("Ext.locale.nl.form.RadioGroup", { override: "Ext.form.RadioGroup", blankText: 'Selecteer een element in deze groep' }); });
JavaScript
/** * Greek translation * By thesilentman (utf8 encoding) * 27 Apr 2008 * * Changes since previous (second) Version: * + added Ext.Date.shortMonthNames * + added Ext.Date.getShortMonthName * + added Ext.Date.monthNumbers * + added Ext.grid.GroupingFeature */ Ext.onReady(function() { var cm = Ext.ClassManager, exists = Ext.Function.bind(cm.get, cm); if (Ext.Updater) { Ext.Updater.defaults.indicatorText = '<div class="loading-indicator">Μεταφόρτωση δεδομένων...</div>'; } Ext.define("Ext.locale.el_GR.view.View", { override: "Ext.view.View", emptyText: "" }); Ext.define("Ext.locale.el_GR.grid.Panel", { override: "Ext.grid.Panel", ddText: "{0} Επιλεγμένες σειρές" }); Ext.define("Ext.locale.el_GR.TabPanelItem", { override: "Ext.TabPanelItem", closeText: "Κλείστε το tab" }); Ext.define("Ext.locale.el_GR.form.field.Base", { override: "Ext.form.field.Base", invalidText: "Το περιεχόμενο του πεδίου δεν είναι αποδεκτό" }); // changing the msg text below will affect the LoadMask Ext.define("Ext.locale.el_GR.view.AbstractView", { override: "Ext.view.AbstractView", msg: "Μεταφόρτωση δεδομένων..." }); if (Ext.Date) { Ext.Date.monthNames = ["Ιανουάριος", "Φεβρουάριος", "Μάρτιος", "Απρίλιος", "Μάιος", "Ιούνιος", "Ιούλιος", "Αύγουστος", "Σεπτέμβριος", "Οκτώβριος", "Νοέμβριος", "Δεκέμβριος"]; Ext.Date.shortMonthNames = ["Ιαν", "Φεβ", "Μάρ", "Απρ", "Μάι", "Ιού", "Ιού", "Αύγ", "Σεπ", "Οκτ", "Νοέ", "Δεκ"]; Ext.Date.getShortMonthName = function(month) { return Ext.Date.monthNames[month].substring(0, 3); }; Ext.Date.monthNumbers = { Jan: 0, Feb: 1, Mar: 2, Apr: 3, May: 4, Jun: 5, Jul: 6, Aug: 7, Sep: 8, Oct: 9, Nov: 10, Dec: 11 }; Ext.Date.getMonthNumber = function(name) { return Ext.Date.monthNumbers[name.substring(0, 1).toUpperCase() + name.substring(1, 3).toLowerCase()]; }; Ext.Date.dayNames = ["Κυριακή", "Δευτέρα", "Τρίτη", "Τετάρτη", "Πέμπτη", "Παρασκευή", "Σάββατο"]; } if (Ext.MessageBox) { Ext.MessageBox.buttonText = { ok: "OK", cancel: "Άκυρο", yes: "Ναι", no: "Όχι" }; } if (exists('Ext.util.Format')) { Ext.apply(Ext.util.Format, { thousandSeparator: '.', decimalSeparator: ',', currencySign: '\u20ac', // Greek Euro dateFormat: 'd/m/Y' }); } Ext.define("Ext.locale.el_GR.picker.Date", { override: "Ext.picker.Date", todayText: "Σήμερα", minText: "Η Ημερομηνία είναι προγενέστερη από την παλαιότερη αποδεκτή", maxText: "Η Ημερομηνία είναι μεταγενέστερη από την νεότερη αποδεκτή", disabledDaysText: "", disabledDatesText: "", monthNames: Ext.Date.monthNames, dayNames: Ext.Date.dayNames, nextText: 'Επόμενος Μήνας (Control+Δεξί Βέλος)', prevText: 'Προηγούμενος Μήνας (Control + Αριστερό Βέλος)', monthYearText: 'Επιλογή Μηνός (Control + Επάνω/Κάτω Βέλος για μεταβολή ετών)', todayTip: "{0} (ΠΛήκτρο Διαστήματος)", format: "d/m/y" }); Ext.define("Ext.locale.el_GR.toolbar.Paging", { override: "Ext.PagingToolbar", beforePageText: "Σελίδα", afterPageText: "από {0}", firstText: "Πρώτη Σελίδα", prevText: "Προηγούμενη Σελίδα", nextText: "Επόμενη Σελίδα", lastText: "Τελευταία Σελίδα", refreshText: "Ανανέωση", displayMsg: "Εμφάνιση {0} - {1} από {2}", emptyMsg: 'Δεν υπάρχουν δεδομένα' }); Ext.define("Ext.locale.el_GR.form.field.Text", { override: "Ext.form.field.Text", minLengthText: "Το μικρότερο αποδεκτό μήκος για το πεδίο είναι {0}", maxLengthText: "Το μεγαλύτερο αποδεκτό μήκος για το πεδίο είναι {0}", blankText: "Το πεδίο είναι υποχρεωτικό", regexText: "", emptyText: null }); Ext.define("Ext.locale.el_GR.form.field.Number", { override: "Ext.form.field.Number", minText: "Η μικρότερη τιμή του πεδίου είναι {0}", maxText: "Η μεγαλύτερη τιμή του πεδίου είναι {0}", nanText: "{0} δεν είναι αποδεκτός αριθμός" }); Ext.define("Ext.locale.el_GR.form.field.Date", { override: "Ext.form.field.Date", disabledDaysText: "Ανενεργό", disabledDatesText: "Ανενεργό", minText: "Η ημερομηνία αυτού του πεδίου πρέπει να είναι μετά την {0}", maxText: "Η ημερομηνία αυτού του πεδίου πρέπει να είναι πριν την {0}", invalidText: "{0} δεν είναι έγκυρη ημερομηνία - πρέπει να είναι στη μορφή {1}", format: "d/m/y" }); Ext.define("Ext.locale.el_GR.form.field.ComboBox", { override: "Ext.form.field.ComboBox", valueNotFoundText: undefined }, function() { Ext.apply(Ext.form.field.ComboBox.prototype.defaultListConfig, { loadingText: "Μεταφόρτωση δεδομένων..." }); }); if (exists('Ext.form.field.VTypes')) { Ext.apply(Ext.form.field.VTypes, { emailText: 'Το πεδίο δέχεται μόνο διευθύνσεις Email σε μορφή "user@example.com"', urlText: 'Το πεδίο δέχεται μόνο URL σε μορφή "http:/' + '/www.example.com"', alphaText: 'Το πεδίο δέχεται μόνο χαρακτήρες και _', alphanumText: 'Το πεδίο δέχεται μόνο χαρακτήρες, αριθμούς και _' }); } Ext.define("Ext.locale.el_GR.form.field.HtmlEditor", { override: "Ext.form.field.HtmlEditor", createLinkText: 'Δώστε τη διεύθυνση (URL) για το σύνδεσμο (link):' }, function() { Ext.apply(Ext.form.field.HtmlEditor.prototype, { buttonTips: { bold: { title: 'Έντονα (Ctrl+B)', text: 'Κάνετε το προεπιλεγμένο κείμενο έντονο.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, italic: { title: 'Πλάγια (Ctrl+I)', text: 'Κάνετε το προεπιλεγμένο κείμενο πλάγιο.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, underline: { title: 'Υπογράμμιση (Ctrl+U)', text: 'Υπογραμμίζετε το προεπιλεγμένο κείμενο.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, increasefontsize: { title: 'Μεγέθυνση κειμένου', text: 'Μεγαλώνετε τη γραμματοσειρά.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, decreasefontsize: { title: 'Σμίκρυνση κειμένου', text: 'Μικραίνετε τη γραμματοσειρά.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, backcolor: { title: 'Χρώμα Φόντου Κειμένου', text: 'Αλλάζετε το χρώμα στο φόντο του προεπιλεγμένου κειμένου.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, forecolor: { title: 'Χρώμα Γραμματοσειράς', text: 'Αλλάζετε το χρώμα στη γραμματοσειρά του προεπιλεγμένου κειμένου.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, justifyleft: { title: 'Αριστερή Στοίχιση Κειμένου', text: 'Στοιχίζετε το κείμενο στα αριστερά.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, justifycenter: { title: 'Κεντράρισμα Κειμένου', text: 'Στοιχίζετε το κείμενο στο κέντρο.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, justifyright: { title: 'Δεξιά Στοίχιση Κειμένου', text: 'Στοιχίζετε το κείμενο στα δεξιά.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, insertunorderedlist: { title: 'Εισαγωγή Λίστας Κουκίδων', text: 'Ξεκινήστε μια λίστα με κουκίδες.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, insertorderedlist: { title: 'Εισαγωγή Λίστας Αρίθμησης', text: 'Ξεκινήστε μια λίστα με αρίθμηση.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, createlink: { title: 'Hyperlink', text: 'Μετατρέπετε το προεπιλεγμένο κείμενο σε Link.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, sourceedit: { title: 'Επεξεργασία Κώδικα', text: 'Μεταβαίνετε στη λειτουργία επεξεργασίας κώδικα.', cls: Ext.baseCSSPrefix + 'html-editor-tip' } } }); }); Ext.define("Ext.locale.el_GR.grid.header.Container", { override: "Ext.grid.header.Container", sortAscText: "Αύξουσα ταξινόμηση", sortDescText: "Φθίνουσα ταξινόμηση", lockText: "Κλείδωμα στήλης", unlockText: "Ξεκλείδωμα στήλης", columnsText: "Στήλες" }); Ext.define("Ext.locale.el_GR.grid.GroupingFeature", { override: "Ext.grid.GroupingFeature", emptyGroupText: '(Καμμία)', groupByText: 'Ομαδοποίηση βάσει αυτού του πεδίου', showGroupsText: 'Να εμφανίζεται στις ομάδες' }); Ext.define("Ext.locale.el_GR.grid.PropertyColumnModel", { override: "Ext.grid.PropertyColumnModel", nameText: "Όνομα", valueText: "Περιεχόμενο", dateFormat: "d/m/Y" }); });
JavaScript
/** * Lithuanian Translations (UTF-8) * Vladas Saulis (vladas at prodata dot lt), 03-29-2009 * Vladas Saulis (vladas at prodata dot lt), 10-18-2007 */ Ext.onReady(function() { var cm = Ext.ClassManager, exists = Ext.Function.bind(cm.get, cm); if (Ext.Updater) { Ext.Updater.defaults.indicatorText = '<div class="loading-indicator">Kraunasi...</div>'; } Ext.define("Ext.locale.lt.view.View", { override: "Ext.view.View", emptyText: "" }); Ext.define("Ext.locale.lt.view.View", { override: "Ext.view.View", emptyText: "" }); Ext.define("Ext.locale.lt.grid.Panel", { override: "Ext.grid.Panel", ddText: "{0} pažymėtų eilučių" }); Ext.define("Ext.locale.lt.TabPanelItem", { override: "Ext.TabPanelItem", closeText: "Uždaryti šią užsklandą" }); Ext.define("Ext.locale.lt.form.field.Base", { override: "Ext.form.field.Base", invalidText: "Šio lauko reikšmė neteisinga" }); // changing the msg text below will affect the LoadMask Ext.define("Ext.locale.lt.view.AbstractView", { override: "Ext.view.AbstractView", msg: "Kraunasi..." }); if (Ext.Date) { Ext.Date.monthNames = ["Sausis", "Vasaris", "Kovas", "Balandis", "Gegužė", "Birželis", "Liepa", "Rugpjūtis", "Rugsėjis", "Spalis", "Lapkritis", "Gruodis"]; Ext.Date.getShortMonthName = function(month) { // Uncommons if (month == 7) return "Rgp"; if (month == 8) return "Rgs"; if (month == 11) return "Grd"; return Ext.Date.monthNames[month].substring(0, 3); }; Ext.Date.monthNumbers = { Sau: 0, Vas: 1, Kov: 2, Bal: 3, Geg: 4, Bir: 5, Lie: 6, Rgp: 7, Rgs: 8, Spa: 9, Lap: 10, Grd: 11 }; Ext.Date.getMonthNumber = function(name) { // Some uncommons if (name == "Rugpjūtis") return 7; if (name == "Rugsėjis") return 8; if (name == "Gruodis") return 11; return Ext.Date.monthNumbers[name.substring(0, 1).toUpperCase() + name.substring(1, 3).toLowerCase()]; }; Ext.Date.dayNames = ["Sekmadienis", "Pirmadienis", "Antradienis", "Trečiadienis", "Ketvirtadienis", "Penktadienis", "Šeštadienis"]; Ext.Date.parseCodes.S.s = "(?:as|as|as|as)"; Ext.Date.getShortDayName = function(day) { return Ext.Date.dayNames[day].substring(0, 3); }; } if (Ext.MessageBox) { Ext.MessageBox.buttonText = { ok: "Gerai", cancel: "Atsisakyti", yes: "Taip", no: "Ne" }; } if (exists('Ext.util.Format')) { Ext.apply(Ext.util.Format, { thousandSeparator: '.', decimalSeparator: ',', currencySign: 'Lt', // Lithuanian Litai dateFormat: 'Y-m-d' }); } Ext.define("Ext.locale.lt.picker.Date", { override: "Ext.picker.Date", todayText: "Šiandien", minText: "Ši data yra mažesnė už leistiną", maxText: "Ši data yra didesnė už leistiną", disabledDaysText: "", disabledDatesText: "", monthNames: Ext.Date.monthNames, dayNames: Ext.Date.dayNames, nextText: 'Kitas mėnuo (Control+Right)', prevText: 'Ankstesnis mėnuo (Control+Left)', monthYearText: 'Pasirinkti mėnesį (Control+Up/Down perėjimui tarp metų)', todayTip: "{0} (Tarpas)", format: "y-m-d", startDay: 1 }); Ext.define("Ext.locale.lt.picker.Month", { override: "Ext.picker.Month", okText: "&#160;Gerai&#160;", cancelText: "Atsisaktyi" }); Ext.define("Ext.locale.lt.toolbar.Paging", { override: "Ext.PagingToolbar", beforePageText: "Puslapis", afterPageText: "iš {0}", firstText: "Pirmas puslapis", prevText: "Ankstesnis pusl.", nextText: "Kitas puslapis", lastText: "Pakutinis pusl.", refreshText: "Atnaujinti", displayMsg: "Rodomi įrašai {0} - {1} iš {2}", emptyMsg: 'Nėra duomenų' }); Ext.define("Ext.locale.lt.form.field.Text", { override: "Ext.form.field.Text", minLengthText: "Minimalus šio lauko ilgis yra {0}", maxLengthText: "Maksimalus šio lauko ilgis yra {0}", blankText: "Šis laukas yra privalomas", regexText: "", emptyText: null }); Ext.define("Ext.locale.lt.form.field.Number", { override: "Ext.form.field.Number", minText: "Minimalus šio lauko ilgis yra {0}", maxText: "Maksimalus šio lauko ilgis yra {0}", nanText: "{0} yra neleistina reikšmė" }); Ext.define("Ext.locale.lt.form.field.Date", { override: "Ext.form.field.Date", disabledDaysText: "Neprieinama", disabledDatesText: "Neprieinama", minText: "Šiame lauke data turi būti didesnė už {0}", maxText: "Šiame lauke data turi būti mažesnėė už {0}", invalidText: "{0} yra neteisinga data - ji turi būti įvesta formatu {1}", format: "y-m-d", altFormats: "y-m-d|y/m/d|Y-m-d|m/d|m-d|md|ymd|Ymd|d|Y-m-d" }); Ext.define("Ext.locale.lt.form.field.ComboBox", { override: "Ext.form.field.ComboBox", valueNotFoundText: undefined }, function() { Ext.apply(Ext.form.field.ComboBox.prototype.defaultListConfig, { loadingText: "Kraunasi..." }); }); if (exists('Ext.form.field.VTypes')) { Ext.apply(Ext.form.field.VTypes, { emailText: 'Šiame lauke turi būti el.pašto adresas formatu "user@example.com"', urlText: 'Šiame lauke turi būti nuoroda (URL) formatu "http:/' + '/www.example.com"', alphaText: 'Šiame lauke gali būti tik raidės ir ženklas "_"', alphanumText: 'Šiame lauke gali būti tik raidės, skaičiai ir ženklas "_"' }); } Ext.define("Ext.locale.lt.form.field.HtmlEditor", { override: "Ext.form.field.HtmlEditor", createLinkText: 'Įveskite URL šiai nuorodai:' }, function() { Ext.apply(Ext.form.field.HtmlEditor.prototype, { buttonTips: { bold: { title: 'Bold (Ctrl+B)', text: 'Teksto paryškinimas.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, italic: { title: 'Italic (Ctrl+I)', text: 'Kursyvinis tekstas.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, underline: { title: 'Underline (Ctrl+U)', text: 'Teksto pabraukimas.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, increasefontsize: { title: 'Padidinti šriftą', text: 'Padidinti šrifto dydį.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, decreasefontsize: { title: 'Sumažinti šriftą', text: 'Sumažinti šrifto dydį.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, backcolor: { title: 'Nuspalvinti teksto foną', text: 'Pakeisti teksto fono spalvą.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, forecolor: { title: 'Teksto spalva', text: 'Pakeisti pažymėto teksto spalvą.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, justifyleft: { title: 'Išlyginti kairen', text: 'Išlyginti tekstą į kairę.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, justifycenter: { title: 'Centruoti tekstą', text: 'Centruoti tektą redaktoriaus lange.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, justifyright: { title: 'Išlyginti dešinėn', text: 'Išlyginti tekstą į dešinę.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, insertunorderedlist: { title: 'Paprastas sąrašas', text: 'Pradėti neorganizuotą sąrašą.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, insertorderedlist: { title: 'Numeruotas sąrašas', text: 'Pradėti numeruotą sąrašą.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, createlink: { title: 'Nuoroda', text: 'Padaryti pažymėta tekstą nuoroda.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, sourceedit: { title: 'Išeities tekstas', text: 'Persijungti į išeities teksto koregavimo režimą.', cls: Ext.baseCSSPrefix + 'html-editor-tip' } } }); }); Ext.define("Ext.locale.lt.form.Basic", { override: "Ext.form.Basic", waitTitle: "Palaukite..." }); Ext.define("Ext.locale.lt.grid.header.Container", { override: "Ext.grid.header.Container", sortAscText: "Rūšiuoti didėjančia tvarka", sortDescText: "Rūšiuoti mažėjančia tvarka", lockText: "Užfiksuoti stulpelį", unlockText: "Atlaisvinti stulpelį", columnsText: "Stulpeliai" }); Ext.define("Ext.locale.lt.grid.GroupingFeature", { override: "Ext.grid.GroupingFeature", emptyGroupText: '(Nėra)', groupByText: 'Grupuoti pagal šį lauką', showGroupsText: 'Rodyti grupėse' }); Ext.define("Ext.locale.lt.grid.PropertyColumnModel", { override: "Ext.grid.PropertyColumnModel", nameText: "Pavadinimas", valueText: "Reikšmė", dateFormat: "Y-m-d" }); Ext.define("Ext.locale.lt.form.field.Time", { override: "Ext.form.field.Time", minText: "Laikas turi buti lygus arba vėlesnis už {0}", maxText: "Laikas turi būti lygus arba ankstesnis už {0}", invalidText: "{0} yra neteisingas laikas", format: "H:i", altFormats: "g:ia|g:iA|g:i a|g:i A|h:i|g:i|H:i|ga|ha|gA|h a|g a|g A|gi|hi|gia|hia|g|H" }); Ext.define("Ext.locale.lt.form.CheckboxGroup", { override: "Ext.form.CheckboxGroup", blankText: "Jūs turite padaryti bent vieną pasirinkimą šioje grupėje" }); Ext.define("Ext.locale.lt.form.RadioGroup", { override: "Ext.form.RadioGroup", blankText: "Jūs turite padaryti bent vieną pasirinkimą šioje grupėje" }); });
JavaScript
/** * Czech Translations * Translated by Tomáš Korčák (72) * 2008/02/08 18:02, Ext-2.0.1 */ Ext.onReady(function() { var cm = Ext.ClassManager, exists = Ext.Function.bind(cm.get, cm); if (Ext.Updater) { Ext.Updater.defaults.indicatorText = '<div class="loading-indicator">Prosím čekejte...</div>'; } Ext.define("Ext.locale.cs.view.View", { override: "Ext.view.View", emptyText: "" }); Ext.define("Ext.locale.cs.grid.Panel", { override: "Ext.grid.Panel", ddText: "{0} vybraných řádků" }); Ext.define("Ext.locale.cs.TabPanelItem", { override: "Ext.TabPanelItem", closeText: "Zavřít záložku" }); Ext.define("Ext.locale.cs.form.field.Base", { override: "Ext.form.field.Base", invalidText: "Hodnota v tomto poli je neplatná" }); // changing the msg text below will affect the LoadMask Ext.define("Ext.locale.cs.view.AbstractView", { override: "Ext.view.AbstractView", msg: "Prosím čekejte..." }); if (Ext.Date) { Ext.Date.monthNames = ["Leden", "Únor", "Březen", "Duben", "Květen", "Červen", "Červenec", "Srpen", "Září", "Říjen", "Listopad", "Prosinec"]; Ext.Date.shortMonthNames = { "Leden": "Led", "Únor": "Úno", "Březen": "Bře", "Duben": "Dub", "Květen": "Kvě", "Červen": "Čer", "Červenec": "Čvc", "Srpen": "Srp", "Září": "Zář", "Říjen": "Říj", "Listopad": "Lis", "Prosinec": "Pro" }; Ext.Date.getShortMonthName = function(month) { return Ext.Date.shortMonthNames[Ext.Date.monthNames[month]]; }; Ext.Date.monthNumbers = { "Leden": 0, "Únor": 1, "Březen": 2, "Duben": 3, "Květen": 4, "Červen": 5, "Červenec": 6, "Srpen": 7, "Září": 8, "Říjen": 9, "Listopad": 10, "Prosinec": 11 }; Ext.Date.getMonthNumber = function(name) { return Ext.Date.monthNumbers[name.substring(0, 1).toUpperCase() + name.substring(1).toLowerCase()]; }; Ext.Date.dayNames = ["Neděle", "Pondělí", "Úterý", "Středa", "Čtvrtek", "Pátek", "Sobota"]; Ext.Date.getShortDayName = function(day) { return Ext.Date.dayNames[day].substring(0, 3); }; } if (Ext.MessageBox) { Ext.MessageBox.buttonText = { ok: "OK", cancel: "Storno", yes: "Ano", no: "Ne" }; } if (exists('Ext.util.Format')) { Ext.apply(Ext.util.Format, { thousandSeparator: '.', decimalSeparator: ',', currencySign: '\u004b\u010d', // Czech Koruny dateFormat: 'd.m.Y' }); } Ext.define("Ext.locale.cs.picker.Date", { override: "Ext.picker.Date", todayText: "Dnes", minText: "Datum nesmí být starší než je minimální", maxText: "Datum nesmí být dřívější než je maximální", disabledDaysText: "", disabledDatesText: "", monthNames: Ext.Date.monthNames, dayNames: Ext.Date.dayNames, nextText: 'Následující měsíc (Control+Right)', prevText: 'Předcházející měsíc (Control+Left)', monthYearText: 'Zvolte měsíc (ke změně let použijte Control+Up/Down)', todayTip: "{0} (Spacebar)", format: "d.m.Y", startDay: 1 }); Ext.define("Ext.locale.cs.picker.Month", { override: "Ext.picker.Month", okText: "&#160;OK&#160;", cancelText: "Storno" }); Ext.define("Ext.locale.cs.toolbar.Paging", { override: "Ext.PagingToolbar", beforePageText: "Strana", afterPageText: "z {0}", firstText: "První strana", prevText: "Přecházející strana", nextText: "Následující strana", lastText: "Poslední strana", refreshText: "Aktualizovat", displayMsg: "Zobrazeno {0} - {1} z celkových {2}", emptyMsg: 'Žádné záznamy nebyly nalezeny' }); Ext.define("Ext.locale.cs.form.field.Text", { override: "Ext.form.field.Text", minLengthText: "Pole nesmí mít méně {0} znaků", maxLengthText: "Pole nesmí být delší než {0} znaků", blankText: "This field is required", regexText: "", emptyText: null }); Ext.define("Ext.locale.cs.form.field.Number", { override: "Ext.form.field.Number", minText: "Hodnota v tomto poli nesmí být menší než {0}", maxText: "Hodnota v tomto poli nesmí být větší než {0}", nanText: "{0} není platné číslo" }); Ext.define("Ext.locale.cs.form.field.Date", { override: "Ext.form.field.Date", disabledDaysText: "Neaktivní", disabledDatesText: "Neaktivní", minText: "Datum v tomto poli nesmí být starší než {0}", maxText: "Datum v tomto poli nesmí být novější než {0}", invalidText: "{0} není platným datem - zkontrolujte zda-li je ve formátu {1}", format: "d.m.Y", altFormats: "d/m/Y|d-m-y|d-m-Y|d/m|d-m|dm|dmy|dmY|d|Y-m-d" }); Ext.define("Ext.locale.cs.form.field.ComboBox", { override: "Ext.form.field.ComboBox", valueNotFoundText: undefined }, function() { Ext.apply(Ext.form.field.ComboBox.prototype.defaultListConfig, { loadingText: "Prosím čekejte..." }); }); if (exists('Ext.form.field.VTypes')) { Ext.apply(Ext.form.field.VTypes, { emailText: 'V tomto poli může být vyplněna pouze emailová adresa ve formátu "uživatel@doména.cz"', urlText: 'V tomto poli může být vyplněna pouze URL (adresa internetové stránky) ve formátu "http:/' + '/www.doména.cz"', alphaText: 'Toto pole může obsahovat pouze písmena abecedy a znak _', alphanumText: 'Toto pole může obsahovat pouze písmena abecedy, čísla a znak _' }); } Ext.define("Ext.locale.cs.form.field.HtmlEditor", { override: "Ext.form.field.HtmlEditor", createLinkText: 'Zadejte URL adresu odkazu:' }, function() { Ext.apply(Ext.form.field.HtmlEditor.prototype, { buttonTips: { bold: { title: 'Tučné (Ctrl+B)', text: 'Označí vybraný text tučně.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, italic: { title: 'Kurzíva (Ctrl+I)', text: 'Označí vybraný text kurzívou.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, underline: { title: 'Podtržení (Ctrl+U)', text: 'Podtrhne vybraný text.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, increasefontsize: { title: 'Zvětšit písmo', text: 'Zvětší velikost písma.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, decreasefontsize: { title: 'Zúžit písmo', text: 'Zmenší velikost písma.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, backcolor: { title: 'Barva zvýraznění textu', text: 'Označí vybraný text tak, aby vypadal jako označený zvýrazňovačem.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, forecolor: { title: 'Barva písma', text: 'Změní barvu textu.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, justifyleft: { title: 'Zarovnat text vlevo', text: 'Zarovná text doleva.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, justifycenter: { title: 'Zarovnat na střed', text: 'Zarovná text na střed.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, justifyright: { title: 'Zarovnat text vpravo', text: 'Zarovná text doprava.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, insertunorderedlist: { title: 'Odrážky', text: 'Začne seznam s odrážkami.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, insertorderedlist: { title: 'Číslování', text: 'Začne číslovaný seznam.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, createlink: { title: 'Internetový odkaz', text: 'Z vybraného textu vytvoří internetový odkaz.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, sourceedit: { title: 'Zdrojový kód', text: 'Přepne do módu úpravy zdrojového kódu.', cls: Ext.baseCSSPrefix + 'html-editor-tip' } } }); }); Ext.define("Ext.locale.cs.grid.header.Container", { override: "Ext.grid.header.Container", sortAscText: "Řadit vzestupně", sortDescText: "Řadit sestupně", lockText: "Ukotvit sloupec", unlockText: "Uvolnit sloupec", columnsText: "Sloupce" }); Ext.define("Ext.locale.cs.grid.GroupingFeature", { override: "Ext.grid.GroupingFeature", emptyGroupText: '(Žádná data)', groupByText: 'Seskupit dle tohoto pole', showGroupsText: 'Zobrazit ve skupině' }); Ext.define("Ext.locale.cs.grid.PropertyColumnModel", { override: "Ext.grid.PropertyColumnModel", nameText: "Název", valueText: "Hodnota", dateFormat: "j.m.Y" }); });
JavaScript
/** * Spanish/Latin American Translation by genius551v 04-08-2007 * Revised by efege, 2007-04-15. * Revised by Rafaga2k 10-01-2007 (mm/dd/yyyy) * Revised by FeDe 12-13-2007 (mm/dd/yyyy) * Synchronized with 2.2 version of ext-lang-en.js (provided by Condor 8 aug 2008) * by halkon_polako 14-aug-2008 */ Ext.onReady(function() { var cm = Ext.ClassManager, exists = Ext.Function.bind(cm.get, cm); if (Ext.Updater) { Ext.Updater.defaults.indicatorText = '<div class="loading-indicator">Cargando...</div>'; } Ext.define("Ext.locale.es.view.View", { override: "Ext.view.View", emptyText: "" }); Ext.define("Ext.locale.es.grid.Panel", { override: "Ext.grid.Panel", ddText: "{0} fila(s) seleccionada(s)" }); // changing the msg text below will affect the LoadMask Ext.define("Ext.locale.es.view.AbstractView", { override: "Ext.view.AbstractView", msg: "Cargando..." }); if (Ext.Date) { Ext.Date.monthNames = ["Enero", "Febrero", "Marzo", "Abril", "Mayo", "Junio", "Julio", "Agosto", "Septiembre", "Octubre", "Noviembre", "Diciembre"]; Ext.Date.getShortMonthName = function(month) { return Ext.Date.monthNames[month].substring(0, 3); }; Ext.Date.monthNumbers = { Ene: 0, Feb: 1, Mar: 2, Abr: 3, May: 4, Jun: 5, Jul: 6, Ago: 7, Sep: 8, Oct: 9, Nov: 10, Dic: 11 }; Ext.Date.getMonthNumber = function(name) { return Ext.Date.monthNumbers[name.substring(0, 1).toUpperCase() + name.substring(1, 3).toLowerCase()]; }; Ext.Date.dayNames = ["Domingo", "Lunes", "Martes", "Miércoles", "Jueves", "Viernes", "Sábado"]; Ext.Date.getShortDayName = function(day) { if (day == 3) return "Mié"; if (day == 6) return "Sáb"; return Ext.Date.dayNames[day].substring(0, 3); }; Ext.Date.parseCodes.S.s = "(?:st|nd|rd|th)"; } if (Ext.MessageBox) { Ext.MessageBox.buttonText = { ok: "Aceptar", cancel: "Cancelar", yes: "Sí", no: "No" }; } if (exists('Ext.util.Format')) { Ext.apply(Ext.util.Format, { thousandSeparator: '.', decimalSeparator: ',', currencySign: '\u20ac', // Spanish Euro dateFormat: 'd/m/Y' }); } Ext.define("Ext.locale.es.picker.Date", { override: "Ext.picker.Date", todayText: "Hoy", minText: "Esta fecha es anterior a la fecha mínima", maxText: "Esta fecha es posterior a la fecha máxima", disabledDaysText: "", disabledDatesText: "", monthNames: Ext.Date.monthNames, dayNames: Ext.Date.dayNames, nextText: 'Mes Siguiente (Control+Right)', prevText: 'Mes Anterior (Control+Left)', monthYearText: 'Seleccione un mes (Control+Up/Down para desplazar el año)', todayTip: "{0} (Barra espaciadora)", format: "d/m/Y", startDay: 1 }); Ext.define("Ext.locale.es.picker.Month", { override: "Ext.picker.Month", okText: "&#160;Aceptar&#160;", cancelText: "Cancelar" }); Ext.define("Ext.locale.es.toolbar.Paging", { override: "Ext.PagingToolbar", beforePageText: "Página", afterPageText: "de {0}", firstText: "Primera página", prevText: "Página anterior", nextText: "Página siguiente", lastText: "Última página", refreshText: "Actualizar", displayMsg: "Mostrando {0} - {1} de {2}", emptyMsg: 'Sin datos para mostrar' }); Ext.define("Ext.locale.es.form.field.Base", { override: "Ext.form.field.Base", invalidText: "El valor en este campo es inválido" }); Ext.define("Ext.locale.es.form.field.Text", { override: "Ext.form.field.Text", minLengthText: "El tamaño mínimo para este campo es de {0}", maxLengthText: "El tamaño máximo para este campo es de {0}", blankText: "Este campo es obligatorio", regexText: "", emptyText: null }); Ext.define("Ext.locale.es.form.field.Number", { override: "Ext.form.field.Number", decimalSeparator: ",", decimalPrecision: 2, minText: "El valor mínimo para este campo es de {0}", maxText: "El valor máximo para este campo es de {0}", nanText: "{0} no es un número válido" }); Ext.define("Ext.locale.es.form.field.Date", { override: "Ext.form.field.Date", disabledDaysText: "Deshabilitado", disabledDatesText: "Deshabilitado", minText: "La fecha para este campo debe ser posterior a {0}", maxText: "La fecha para este campo debe ser anterior a {0}", invalidText: "{0} no es una fecha válida - debe tener el formato {1}", format: "d/m/Y", altFormats: "d/m/Y|d-m-y|d-m-Y|d/m|d-m|dm|dmy|dmY|d|Y-m-d" }); Ext.define("Ext.locale.es.form.field.ComboBox", { override: "Ext.form.field.ComboBox", valueNotFoundText: undefined }, function() { Ext.apply(Ext.form.field.ComboBox.prototype.defaultListConfig, { loadingText: "Cargando..." }); }); if (exists('Ext.form.field.VTypes')) { Ext.apply(Ext.form.field.VTypes, { emailText: 'Este campo debe ser una dirección de correo electrónico con el formato "usuario@dominio.com"', urlText: 'Este campo debe ser una URL con el formato "http:/' + '/www.dominio.com"', alphaText: 'Este campo sólo debe contener letras y _', alphanumText: 'Este campo sólo debe contener letras, números y _' }); } Ext.define("Ext.locale.es.form.field.HtmlEditor", { override: "Ext.form.field.HtmlEditor", createLinkText: "Por favor proporcione la URL para el enlace:" }, function() { Ext.apply(Ext.form.field.HtmlEditor.prototype, { buttonTips: { bold: { title: 'Negritas (Ctrl+B)', text: 'Transforma el texto seleccionado en Negritas.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, italic: { title: 'Itálica (Ctrl+I)', text: 'Transforma el texto seleccionado en Itálicas.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, underline: { title: 'Subrayado (Ctrl+U)', text: 'Subraya el texto seleccionado.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, increasefontsize: { title: 'Aumentar la fuente', text: 'Aumenta el tamaño de la fuente', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, decreasefontsize: { title: 'Reducir la fuente', text: 'Reduce el tamaño de la fuente.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, backcolor: { title: 'Color de fondo', text: 'Modifica el color de fondo del texto seleccionado.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, forecolor: { title: 'Color de la fuente', text: 'Modifica el color del texto seleccionado.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, justifyleft: { title: 'Alinear a la izquierda', text: 'Alinea el texto a la izquierda.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, justifycenter: { title: 'Centrar', text: 'Centrar el texto.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, justifyright: { title: 'Alinear a la derecha', text: 'Alinea el texto a la derecha.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, insertunorderedlist: { title: 'Lista de viñetas', text: 'Inicia una lista con viñetas.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, insertorderedlist: { title: 'Lista numerada', text: 'Inicia una lista numerada.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, createlink: { title: 'Enlace', text: 'Inserta un enlace de hipertexto.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, sourceedit: { title: 'Código Fuente', text: 'Pasar al modo de edición de código fuente.', cls: Ext.baseCSSPrefix + 'html-editor-tip' } } }); }); Ext.define("Ext.locale.es.grid.header.Container", { override: "Ext.grid.header.Container", sortAscText: "Ordenar en forma ascendente", sortDescText: "Ordenar en forma descendente", columnsText: "Columnas" }); Ext.define("Ext.locale.es.grid.GroupingFeature", { override: "Ext.grid.GroupingFeature", emptyGroupText: '(Ninguno)', groupByText: 'Agrupar por este campo', showGroupsText: 'Mostrar en grupos' }); Ext.define("Ext.locale.es.grid.PropertyColumnModel", { override: "Ext.grid.PropertyColumnModel", nameText: "Nombre", valueText: "Valor", dateFormat: "j/m/Y" }); Ext.define("Ext.locale.es.form.field.Time", { override: "Ext.form.field.Time", minText: "La hora en este campo debe ser igual o posterior a {0}", maxText: "La hora en este campo debe ser igual o anterior a {0}", invalidText: "{0} no es una hora válida", format: "g:i A", altFormats: "g:ia|g:iA|g:i a|g:i A|h:i|g:i|H:i|ga|ha|gA|h a|g a|g A|gi|hi|gia|hia|g|H" }); Ext.define("Ext.locale.es.form.CheckboxGroup", { override: "Ext.form.CheckboxGroup", blankText: "Debe seleccionar al menos un étem de este grupo" }); Ext.define("Ext.locale.es.form.RadioGroup", { override: "Ext.form.RadioGroup", blankText: "Debe seleccionar un étem de este grupo" }); });
JavaScript
/** * Japanese translation * By tyama * 04-08-2007, 05:49 AM * * update based on English Translations by Condor (8 Aug 2008) * By sakuro (30 Aug 2008) */ Ext.onReady(function() { var cm = Ext.ClassManager, exists = Ext.Function.bind(cm.get, cm); if (Ext.Updater) { Ext.Updater.defaults.indicatorText = '<div class="loading-indicator">読み込み中...</div>'; } Ext.define("Ext.locale.ja.view.View", { override: "Ext.view.View", emptyText: "" }); Ext.define("Ext.locale.ja.grid.Panel", { override: "Ext.grid.Panel", ddText: "{0} 行選択" }); // changing the msg text below will affect the LoadMask Ext.define("Ext.locale.ja.view.AbstractView", { override: "Ext.view.AbstractView", msg: "読み込み中..." }); if (Ext.Date) { Ext.Date.monthNames = ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月']; Ext.Date.getShortMonthName = function(month) { return "" + (month + 1); }; Ext.Date.monthNumbers = { "1": 0, "2": 1, "3": 2, "4": 3, "5": 4, "6": 5, "7": 6, "8": 7, "9": 8, "10": 9, "11": 10, "12": 11 }; Ext.Date.getMonthNumber = function(name) { return Ext.Date.monthNumbers[name.substring(0, name.length - 1)]; // or simply parseInt(name.substring(0, name.length - 1)) - 1 }; Ext.Date.dayNames = ["日曜日", "月曜日", "火曜日", "水曜日", "木曜日", "金曜日", "土曜日"]; Ext.Date.getShortDayName = function(day) { return Ext.Date.dayNames[day].substring(0, 1); // just remove "曜日" suffix }; Ext.Date.formatCodes.a = "(this.getHours() < 12 ? '午前' : '午後')"; Ext.Date.formatCodes.A = "(this.getHours() < 12 ? '午前' : '午後')"; // no case difference } if (Ext.MessageBox) { Ext.MessageBox.buttonText = { ok: "OK", cancel: "キャンセル", yes: "はい", no: "いいえ" }; } if (exists('Ext.util.Format')) { Ext.apply(Ext.util.Format, { thousandSeparator: ',', decimalSeparator: '.', currencySign: '\u00a5', // Japanese Yen dateFormat: 'Y/m/d' }); } Ext.define("Ext.locale.ja.picker.Date", { override: "Ext.picker.Date", todayText: "今日", minText: "選択した日付は最小値以下です。", maxText: "選択した日付は最大値以上です。", disabledDaysText: "", disabledDatesText: "", monthNames: Ext.Date.monthNames, dayNames: Ext.Date.dayNames, nextText: '次月へ (コントロール+右)', prevText: '前月へ (コントロール+左)', monthYearText: '月選択 (コントロール+上/下で年移動)', todayTip: "{0} (スペースキー)", format: "Y/m/d", startDay: 0, ariaTitle: '{0}', ariaTitleDateFormat: 'Y\u5e74m\u6708d\u65e5', longDayFormat: 'Y\u5e74m\u6708d\u65e5', monthYearFormat: 'Y\u5e74m\u6708' }); Ext.define("Ext.locale.ja.picker.Month", { override: "Ext.picker.Month", okText: "&#160;OK&#160;", cancelText: "キャンセル" }); Ext.define("Ext.locale.ja.toolbar.Paging", { override: "Ext.PagingToolbar", beforePageText: "ページ", afterPageText: "/ {0}", firstText: "最初のページ", prevText: "前のページ", nextText: "次のページ", lastText: "最後のページ", refreshText: "更新", displayMsg: "{2} 件中 {0} - {1} を表示", emptyMsg: '表示するデータがありません。' }); Ext.define("Ext.locale.ja.form.field.Base", { override: "Ext.form.field.Base", invalidText: "フィールドの値が不正です。" }); Ext.define("Ext.locale.ja.form.field.Text", { override: "Ext.form.field.Text", minLengthText: "このフィールドの最小値は {0} です。", maxLengthText: "このフィールドの最大値は {0} です。", blankText: "必須項目です。", regexText: "", emptyText: null }); Ext.define("Ext.locale.ja.form.field.Number", { override: "Ext.form.field.Number", decimalSeparator: ".", decimalPrecision: 2, minText: "このフィールドの最小値は {0} です。", maxText: "このフィールドの最大値は {0} です。", nanText: "{0} は数値ではありません。" }); Ext.define("Ext.locale.ja.form.field.Date", { override: "Ext.form.field.Date", disabledDaysText: "無効", disabledDatesText: "無効", minText: "このフィールドの日付は、 {0} 以降の日付に設定してください。", maxText: "このフィールドの日付は、 {0} 以前の日付に設定してください。", invalidText: "{0} は間違った日付入力です。 - 入力形式は「{1}」です。", format: "Y/m/d", altFormats: "y/m/d|m/d/y|m/d/Y|m-d-y|m-d-Y|m/d|m-d|md|mdy|mdY|d|Y-m-d" }); Ext.define("Ext.locale.ja.form.field.ComboBox", { override: "Ext.form.field.ComboBox", valueNotFoundText: undefined }, function() { Ext.apply(Ext.form.field.ComboBox.prototype.defaultListConfig, { loadingText: "読み込み中..." }); }); if (exists('Ext.form.field.VTypes')) { Ext.apply(Ext.form.field.VTypes, { emailText: 'メールアドレスを"user@example.com"の形式で入力してください。', urlText: 'URLを"http:/' + '/www.example.com"の形式で入力してください。', alphaText: '半角英字と"_"のみです。', alphanumText: '半角英数と"_"のみです。' }); } Ext.define("Ext.locale.ja.form.field.HtmlEditor", { override: "Ext.form.field.HtmlEditor", createLinkText: 'リンクのURLを入力してください:' }, function() { Ext.apply(Ext.form.field.HtmlEditor.prototype, { buttonTips: { bold: { title: '太字 (コントロール+B)', text: '選択テキストを太字にします。', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, italic: { title: '斜体 (コントロール+I)', text: '選択テキストを斜体にします。', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, underline: { title: '下線 (コントロール+U)', text: '選択テキストに下線を引きます。', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, increasefontsize: { title: '文字を大きく', text: 'フォントサイズを大きくします。', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, decreasefontsize: { title: '文字を小さく', text: 'フォントサイズを小さくします。', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, backcolor: { title: '文字のハイライト', text: '選択テキストの背景色を変更します。', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, forecolor: { title: '文字の色', text: '選択テキストの色を変更します。', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, justifyleft: { title: '左揃え', text: 'テキストを左揃えにします。', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, justifycenter: { title: '中央揃え', text: 'テキストを中央揃えにします。', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, justifyright: { title: '右揃え', text: 'テキストを右揃えにします。', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, insertunorderedlist: { title: '番号なし箇条書き', text: '番号なし箇条書きを開始します。', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, insertorderedlist: { title: '番号付き箇条書き', text: '番号付き箇条書きを開始します。', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, createlink: { title: 'ハイパーリンク', text: '選択テキストをハイパーリンクにします。', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, sourceedit: { title: 'ソース編集', text: 'ソース編集モードに切り替えます。', cls: Ext.baseCSSPrefix + 'html-editor-tip' } } }); }); Ext.define("Ext.locale.ja.grid.header.Container", { override: "Ext.grid.header.Container", sortAscText: "昇順", sortDescText: "降順", columnsText: "カラム" }); Ext.define("Ext.locale.ja.grid.GroupingFeature", { override: "Ext.grid.GroupingFeature", emptyGroupText: '(なし)', groupByText: 'このカラムでグルーピング', showGroupsText: 'グルーピング' }); Ext.define("Ext.locale.ja.grid.PropertyColumnModel", { override: "Ext.grid.PropertyColumnModel", nameText: "名称", valueText: "値", dateFormat: "Y/m/d" }); Ext.define("Ext.locale.ja.form.field.Time", { override: "Ext.form.field.Time", minText: "このフィールドの時刻は、 {0} 以降の時刻に設定してください。", maxText: "このフィールドの時刻は、 {0} 以前の時刻に設定してください。", invalidText: "{0} は間違った時刻入力です。", format: "g:i A", altFormats: "g:ia|g:iA|g:i a|g:i A|h:i|g:i|H:i|ga|ha|gA|h a|g a|g A|gi|hi|gia|hia|g|H" }); Ext.define("Ext.locale.ja.form.CheckboxGroup", { override: "Ext.form.CheckboxGroup", blankText: "このグループから最低1つのアイテムを選択しなければなりません。" }); Ext.define("Ext.locale.ja.form.RadioGroup", { override: "Ext.form.RadioGroup", blankText: "このグループから1つのアイテムを選択しなければなりません。" }); });
JavaScript
/** * Serbian Latin Translation * by Atila Hajnal (latin, utf8 encoding) * sr * 14 Sep 2007 */ Ext.onReady(function() { var cm = Ext.ClassManager, exists = Ext.Function.bind(cm.get, cm); if (Ext.Updater) { Ext.Updater.defaults.indicatorText = '<div class="loading-indicator">Učitavam...</div>'; } Ext.define("Ext.locale.sr.view.View", { override: "Ext.view.View", emptyText: "Ne postoji ni jedan slog" }); Ext.define("Ext.locale.sr.grid.Panel", { override: "Ext.grid.Panel", ddText: "{0} izabranih redova" }); Ext.define("Ext.locale.sr.TabPanelItem", { override: "Ext.TabPanelItem", closeText: "Zatvori оvu »karticu«" }); Ext.define("Ext.locale.sr.form.field.Base", { override: "Ext.form.field.Base", invalidText: "Unešena vrednost nije pravilna" }); // changing the msg text below will affect the LoadMask Ext.define("Ext.locale.sr.view.AbstractView", { override: "Ext.view.AbstractView", msg: "Učitavam..." }); if (Ext.Date) { Ext.Date.monthNames = ["Januar", "Februar", "Mart", "April", "Мај", "Jun", "Јul", "Avgust", "Septembar", "Oktobar", "Novembar", "Decembar"]; Ext.Date.dayNames = ["Nedelja", "Ponedeljak", "Utorak", "Sreda", "Četvrtak", "Petak", "Subota"]; } if (Ext.MessageBox) { Ext.MessageBox.buttonText = { ok: "U redu", cancel: "Odustani", yes: "Da", no: "Ne" }; } if (exists('Ext.util.Format')) { Ext.apply(Ext.util.Format, { thousandSeparator: '.', decimalSeparator: ',', currencySign: '\u0414\u0438\u043d\u002e', // Serbian Dinar dateFormat: 'd.m.Y' }); } Ext.define("Ext.locale.sr.picker.Date", { override: "Ext.picker.Date", todayText: "Danas", minText: "Datum је ispred najmanjeg dozvoljenog datuma", maxText: "Datum је nakon najvećeg dozvoljenog datuma", disabledDaysText: "", disabledDatesText: "", monthNames: Ext.Date.monthNames, dayNames: Ext.Date.dayNames, nextText: 'Sledeći mesec (Control+Desno)', prevText: 'Prethodni mesec (Control+Levo)', monthYearText: 'Izaberite mesec (Control+Gore/Dole za izbor godine)', todayTip: "{0} (Razmaknica)", format: "d.m.y", startDay: 1 }); Ext.define("Ext.locale.sr.toolbar.Paging", { override: "Ext.PagingToolbar", beforePageText: "Strana", afterPageText: "od {0}", firstText: "Prva strana", prevText: "Prethodna strana", nextText: "Sledeća strana", lastText: "Poslednja strana", refreshText: "Osveži", displayMsg: "Prikazana {0} - {1} od {2}", emptyMsg: 'Nemam šta prikazati' }); Ext.define("Ext.locale.sr.form.field.Text", { override: "Ext.form.field.Text", minLengthText: "Minimalna dužina ovog polja је {0}", maxLengthText: "Maksimalna dužina ovog polja је {0}", blankText: "Polje је obavezno", regexText: "", emptyText: null }); Ext.define("Ext.locale.sr.form.field.Number", { override: "Ext.form.field.Number", minText: "Minimalna vrednost u polju је {0}", maxText: "Maksimalna vrednost u polju је {0}", nanText: "{0} nije pravilan broj" }); Ext.define("Ext.locale.sr.form.field.Date", { override: "Ext.form.field.Date", disabledDaysText: "Pasivno", disabledDatesText: "Pasivno", minText: "Datum u ovom polju mora biti nakon {0}", maxText: "Datum u ovom polju mora biti pre {0}", invalidText: "{0} nije pravilan datum - zahtevani oblik je {1}", format: "d.m.y", altFormats: "d.m.y|d/m/Y|d-m-y|d-m-Y|d/m|d-m|dm|dmy|dmY|d|Y-m-d" }); Ext.define("Ext.locale.sr.form.field.ComboBox", { override: "Ext.form.field.ComboBox", valueNotFoundText: undefined }, function() { Ext.apply(Ext.form.field.ComboBox.prototype.defaultListConfig, { loadingText: "Učitavam..." }); }); if (exists('Ext.form.field.VTypes')) { Ext.apply(Ext.form.field.VTypes, { emailText: 'Ovo polje prihavata e-mail adresu isključivo u obliku "korisnik@domen.com"', urlText: 'Ovo polje prihavata URL adresu isključivo u obliku "http:/' + '/www.domen.com"', alphaText: 'Ovo polje može sadržati isključivo slova i znak _', alphanumText: 'Ovo polje može sadržati само slova, brojeve i znak _' }); } Ext.define("Ext.locale.sr.grid.header.Container", { override: "Ext.grid.header.Container", sortAscText: "Rastući redosled", sortDescText: "Opadajući redosled", lockText: "Zaključaj kolonu", unlockText: "Otključaj kolonu", columnsText: "Kolone" }); Ext.define("Ext.locale.sr.grid.PropertyColumnModel", { override: "Ext.grid.PropertyColumnModel", nameText: "Naziv", valueText: "Vrednost", dateFormat: "d.m.Y" }); });
JavaScript
/** * List compiled by KillerNay on the extjs.com forums. * Thank you KillerNay! * * Thailand Translations */ Ext.onReady(function() { var cm = Ext.ClassManager, exists = Ext.Function.bind(cm.get, cm); if (Ext.Updater) { Ext.Updater.defaults.indicatorText = '<div class="loading-indicator">¡ÓÅѧâËÅŽ...</div>'; } Ext.define("Ext.locale.th.view.View", { override: "Ext.view.View", emptyText: "" }); Ext.define("Ext.locale.th.grid.Panel", { override: "Ext.grid.Panel", ddText: "{0} àÅ×Í¡áÅéÇ·Ñé§ËÁŽá¶Ç" }); Ext.define("Ext.locale.th.TabPanelItem", { override: "Ext.TabPanelItem", closeText: "»ÔŽá·çº¹Õé" }); Ext.define("Ext.locale.th.form.field.Base", { override: "Ext.form.field.Base", invalidText: "€èҢͧªèͧ¹ÕéäÁè¶Ù¡µéͧ" }); // changing the msg text below will affect the LoadMask Ext.define("Ext.locale.th.view.AbstractView", { override: "Ext.view.AbstractView", msg: "¡ÓÅѧâËÅŽ..." }); if (Ext.Date) { Ext.Date.monthNames = ["Á¡ÃÒ€Á", "¡ØÁŸÒӟѹžì", "ÁÕ¹Ò€Á", "àÁÉÒ¹", "ŸÄÉÀÒ€Á", "ÁԶعÒ¹", "¡Ä¡¯Ò€Á", "ÊÔ§ËÒ€Á", "¡Ñ¹ÂÒ¹", "µØÅÒ€Á", "ŸÄÈšÔ¡Ò¹", "žÑ¹ÇÒ€Á"]; Ext.Date.getShortMonthName = function(month) { return Ext.Date.monthNames[month].substring(0, 3); }; Ext.Date.monthNumbers = { "Á€": 0, "¡Ÿ": 1, "ÁÕ€": 2, "àÁÂ": 3, "Ÿ€": 4, "ÁÔÂ": 5, "¡€": 6, "Ê€": 7, "¡Â": 8, "µ€": 9, "ŸÂ": 10, "ž€": 11 }; Ext.Date.getMonthNumber = function(name) { return Ext.Date.monthNumbers[name.substring(0, 1).toUpperCase() + name.substring(1, 3).toLowerCase()]; }; Ext.Date.dayNames = ["ÍÒ·ÔµÂì", "šÑ¹·Ãì", "Íѧ€ÒÃ", "ŸØ×ž", "ŸÄËÑʺŽÕ", "ÈØ¡Ãì", "àÊÒÃì"]; Ext.Date.getShortDayName = function(day) { return Ext.Date.dayNames[day].substring(0, 3); }; } if (Ext.MessageBox) { Ext.MessageBox.buttonText = { ok: "µ¡Å§", cancel: "¡àÅÔ¡", yes: "ãªè", no: "äÁèãªè" }; } if (exists('Ext.util.Format')) { Ext.apply(Ext.util.Format, { thousandSeparator: '.', decimalSeparator: ',', currencySign: '\u0e3f', // Thai Baht dateFormat: 'm/d/Y' }); } Ext.define("Ext.locale.th.picker.Date", { override: "Ext.picker.Date", todayText: "Çѹ¹Õé", minText: "This date is before the minimum date", maxText: "This date is after the maximum date", disabledDaysText: "", disabledDatesText: "", monthNames: Ext.Date.monthNames, dayNames: Ext.Date.dayNames, nextText: 'àŽ×͹¶ÑŽä» (Control+Right)', prevText: 'àŽ×͹¡è͹˹éÒ (Control+Left)', monthYearText: 'àÅ×Í¡àŽ×͹ (Control+Up/Down to move years)', todayTip: "{0} (Spacebar)", format: "m/d/y", startDay: 0 }); Ext.define("Ext.locale.th.picker.Month", { override: "Ext.picker.Month", okText: "&#160;µ¡Å§&#160;", cancelText: "¡àÅÔ¡" }); Ext.define("Ext.locale.th.toolbar.Paging", { override: "Ext.PagingToolbar", beforePageText: "˹éÒ", afterPageText: "of {0}", firstText: "˹éÒáá", prevText: "¡è͹˹éÒ", nextText: "¶ÑŽä»", lastText: "˹éÒÊØŽ·éÒÂ", refreshText: "ÃÕà¿Ãª", displayMsg: "¡ÓÅѧáÊŽ§ {0} - {1} šÒ¡ {2}", emptyMsg: 'äÁèÁÕ¢éÍÁÙÅáÊŽ§' }); Ext.define("Ext.locale.th.form.field.Text", { override: "Ext.form.field.Text", minLengthText: "The minimum length for this field is {0}", maxLengthText: "The maximum length for this field is {0}", blankText: "This field is required", regexText: "", emptyText: null }); Ext.define("Ext.locale.th.form.field.Number", { override: "Ext.form.field.Number", minText: "The minimum value for this field is {0}", maxText: "The maximum value for this field is {0}", nanText: "{0} is not a valid number" }); Ext.define("Ext.locale.th.form.field.Date", { override: "Ext.form.field.Date", disabledDaysText: "»ÔŽ", disabledDatesText: "»ÔŽ", minText: "The date in this field must be after {0}", maxText: "The date in this field must be before {0}", invalidText: "{0} is not a valid date - it must be in the format {1}", format: "m/d/y", altFormats: "m/d/Y|m-d-y|m-d-Y|m/d|m-d|md|mdy|mdY|d|Y-m-d" }); Ext.define("Ext.locale.th.form.field.ComboBox", { override: "Ext.form.field.ComboBox", valueNotFoundText: undefined }, function() { Ext.apply(Ext.form.field.ComboBox.prototype.defaultListConfig, { loadingText: "¡ÓÅѧâËÅŽ..." }); }); if (exists('Ext.form.field.VTypes')) { Ext.apply(Ext.form.field.VTypes, { emailText: 'This field should be an e-mail address in the format "user@example.com"', urlText: 'This field should be a URL in the format "http:/' + '/www.example.com"', alphaText: 'This field should only contain letters and _', alphanumText: 'This field should only contain letters, numbers and _' }); } Ext.define("Ext.locale.th.form.field.HtmlEditor", { override: "Ext.form.field.HtmlEditor", createLinkText: 'Please enter the URL for the link:' }, function() { Ext.apply(Ext.form.field.HtmlEditor.prototype, { buttonTips: { bold: { title: 'Bold (Ctrl+B)', text: 'Make the selected text bold.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, italic: { title: 'Italic (Ctrl+I)', text: 'Make the selected text italic.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, underline: { title: 'Underline (Ctrl+U)', text: 'Underline the selected text.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, increasefontsize: { title: 'Grow Text', text: 'Increase the font size.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, decreasefontsize: { title: 'Shrink Text', text: 'Decrease the font size.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, backcolor: { title: 'Text Highlight Color', text: 'Change the background color of the selected text.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, forecolor: { title: 'Font Color', text: 'Change the color of the selected text.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, justifyleft: { title: 'Align Text Left', text: 'Align text to the left.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, justifycenter: { title: 'Center Text', text: 'Center text in the editor.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, justifyright: { title: 'Align Text Right', text: 'Align text to the right.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, insertunorderedlist: { title: 'Bullet List', text: 'Start a bulleted list.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, insertorderedlist: { title: 'Numbered List', text: 'Start a numbered list.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, createlink: { title: 'Hyperlink', text: 'Make the selected text a hyperlink.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, sourceedit: { title: 'Source Edit', text: 'Switch to source editing mode.', cls: Ext.baseCSSPrefix + 'html-editor-tip' } } }); }); Ext.define("Ext.locale.th.grid.header.Container", { override: "Ext.grid.header.Container", sortAscText: "Sort Ascending", sortDescText: "Sort Descending", lockText: "Lock Column", unlockText: "Unlock Column", columnsText: "Columns" }); Ext.define("Ext.locale.th.grid.GroupingFeature", { override: "Ext.grid.GroupingFeature", emptyGroupText: '(None)', groupByText: 'Group By This Field', showGroupsText: 'Show in Groups' }); Ext.define("Ext.locale.th.grid.PropertyColumnModel", { override: "Ext.grid.PropertyColumnModel", nameText: "Name", valueText: "Value", dateFormat: "m/j/Y" }); });
JavaScript
/** * * Norwegian translation (Nynorsk: no-NN) * By Tore Kjørsvik 21-January-2008 * */ Ext.onReady(function() { var cm = Ext.ClassManager, exists = Ext.Function.bind(cm.get, cm); if (Ext.Updater) { Ext.Updater.defaults.indicatorText = '<div class="loading-indicator">Lastar...</div>'; } Ext.define("Ext.locale.no_NN.view.View", { override: "Ext.view.View", emptyText: "" }); Ext.define("Ext.locale.no_NN.grid.Panel", { override: "Ext.grid.Panel", ddText: "{0} markert(e) rad(er)" }); Ext.define("Ext.locale.no_NN.TabPanelItem", { override: "Ext.TabPanelItem", closeText: "Lukk denne fana" }); Ext.define("Ext.locale.no_NN.form.field.Base", { override: "Ext.form.field.Base", invalidText: "Verdien i dette feltet er ugyldig" }); // changing the msg text below will affect the LoadMask Ext.define("Ext.locale.no_NN.view.AbstractView", { override: "Ext.view.AbstractView", msg: "Lastar..." }); if (Ext.Date) { Ext.Date.monthNames = ["Januar", "Februar", "Mars", "April", "Mai", "Juni", "Juli", "August", "September", "Oktober", "November", "Desember"]; Ext.Date.getShortMonthName = function(month) { return Ext.Date.monthNames[month].substring(0, 3); }; Ext.Date.monthNumbers = { Jan: 0, Feb: 1, Mar: 2, Apr: 3, Mai: 4, Jun: 5, Jul: 6, Aug: 7, Sep: 8, Okt: 9, Nov: 10, Des: 11 }; Ext.Date.getMonthNumber = function(name) { return Ext.Date.monthNumbers[name.substring(0, 1).toUpperCase() + name.substring(1, 3).toLowerCase()]; }; Ext.Date.dayNames = ["Søndag", "Måndag", "Tysdag", "Onsdag", "Torsdag", "Fredag", "Laurdag"]; Ext.Date.getShortDayName = function(day) { return Ext.Date.dayNames[day].substring(0, 3); }; } if (Ext.MessageBox) { Ext.MessageBox.buttonText = { ok: "OK", cancel: "Avbryt", yes: "Ja", no: "Nei" }; } if (exists('Ext.util.Format')) { Ext.apply(Ext.util.Format, { thousandSeparator: '.', decimalSeparator: ',', currencySign: 'kr', // Norwegian Krone dateFormat: 'd.m.Y' }); } Ext.define("Ext.locale.no_NN.picker.Date", { override: "Ext.picker.Date", todayText: "I dag", minText: "Denne datoen er før tidlegaste tillatne dato", maxText: "Denne datoen er etter seinaste tillatne dato", disabledDaysText: "", disabledDatesText: "", monthNames: Ext.Date.monthNames, dayNames: Ext.Date.dayNames, nextText: 'Neste månad (Control+Pil Høgre)', prevText: 'Førre månad (Control+Pil Venstre)', monthYearText: 'Velj ein månad (Control+Pil Opp/Ned for å skifte år)', todayTip: "{0} (Mellomrom)", format: "d.m.y", startDay: 1 }); Ext.define("Ext.locale.no_NN.picker.Month", { override: "Ext.picker.Month", okText: "&#160;OK&#160;", cancelText: "Avbryt" }); Ext.define("Ext.locale.no_NN.toolbar.Paging", { override: "Ext.PagingToolbar", beforePageText: "Side", afterPageText: "av {0}", firstText: "Første sida", prevText: "Førre sida", nextText: "Neste sida", lastText: "Siste sida", refreshText: "Oppdater", displayMsg: "Viser {0} - {1} av {2}", emptyMsg: 'Ingen data å vise' }); Ext.define("Ext.locale.no_NN.form.field.Text", { override: "Ext.form.field.Text", minLengthText: "Den minste lengda for dette feltet er {0}", maxLengthText: "Den største lengda for dette feltet er {0}", blankText: "Dette feltet er påkravd", regexText: "", emptyText: null }); Ext.define("Ext.locale.no_NN.form.field.Number", { override: "Ext.form.field.Number", minText: "Den minste verdien for dette feltet er {0}", maxText: "Den største verdien for dette feltet er {0}", nanText: "{0} er ikkje eit gyldig nummer" }); Ext.define("Ext.locale.no_NN.form.field.Date", { override: "Ext.form.field.Date", disabledDaysText: "Deaktivert", disabledDatesText: "Deaktivert", minText: "Datoen i dette feltet må vere etter {0}", maxText: "Datoen i dette feltet må vere før {0}", invalidText: "{0} er ikkje ein gyldig dato - han må vere på formatet {1}", format: "d.m.y", altFormats: "d.m.Y|d/m/y|d/m/Y|d-m-y|d-m-Y|d.m|d/m|d-m|dm|dmy|dmY|Y-m-d|d" }); Ext.define("Ext.locale.no_NN.form.field.ComboBox", { override: "Ext.form.field.ComboBox", valueNotFoundText: undefined }, function() { Ext.apply(Ext.form.field.ComboBox.prototype.defaultListConfig, { loadingText: "Lastar..." }); }); if (exists('Ext.form.field.VTypes')) { Ext.apply(Ext.form.field.VTypes, { emailText: 'Dette feltet skal vere ei epost adresse på formatet "bruker@domene.no"', urlText: 'Dette feltet skal vere ein link (URL) på formatet "http:/' + '/www.domene.no"', alphaText: 'Dette feltet skal berre innehalde bokstavar og _', alphanumText: 'Dette feltet skal berre innehalde bokstavar, tal og _' }); } Ext.define("Ext.locale.no_NN.form.field.HtmlEditor", { override: "Ext.form.field.HtmlEditor", createLinkText: 'Ver venleg og skriv inn URL for lenken:' }, function() { Ext.apply(Ext.form.field.HtmlEditor.prototype, { buttonTips: { bold: { title: 'Feit (Ctrl+B)', text: 'Gjer den valde teksten feit.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, italic: { title: 'Kursiv (Ctrl+I)', text: 'Gjer den valde teksten kursiv.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, underline: { title: 'Understrek (Ctrl+U)', text: 'Understrek den valde teksten.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, increasefontsize: { title: 'Forstørr tekst', text: 'Gjer fontstorleik større.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, decreasefontsize: { title: 'Forminsk tekst', text: 'Gjer fontstorleik mindre.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, backcolor: { title: 'Tekst markeringsfarge', text: 'Endre bakgrunnsfarge til den valde teksten.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, forecolor: { title: 'Font farge', text: 'Endre farge på den valde teksten.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, justifyleft: { title: 'Venstrejuster tekst', text: 'Venstrejuster teksten.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, justifycenter: { title: 'Sentrer tekst', text: 'Sentrer teksten.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, justifyright: { title: 'Høgrejuster tekst', text: 'Høgrejuster teksten.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, insertunorderedlist: { title: 'Punktliste', text: 'Start ei punktliste.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, insertorderedlist: { title: 'Nummerert liste', text: 'Start ei nummerert liste.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, createlink: { title: 'Lenke', text: 'Gjer den valde teksten til ei lenke.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, sourceedit: { title: 'Rediger kjelde', text: 'Bytt til kjelderedigeringsvising.', cls: Ext.baseCSSPrefix + 'html-editor-tip' } } }); }); Ext.define("Ext.locale.no_NN.grid.header.Container", { override: "Ext.grid.header.Container", sortAscText: "Sorter stigande", sortDescText: "Sorter fallande", lockText: "Lås kolonne", unlockText: "Lås opp kolonne", columnsText: "Kolonner" }); Ext.define("Ext.locale.no_NN.grid.GroupingFeature", { override: "Ext.grid.GroupingFeature", emptyGroupText: '(Ingen)', groupByText: 'Grupper etter dette feltet', showGroupsText: 'Vis i grupper' }); Ext.define("Ext.locale.no_NN.grid.PropertyColumnModel", { override: "Ext.grid.PropertyColumnModel", nameText: "Namn", valueText: "Verdi", dateFormat: "d.m.Y" }); });
JavaScript
/** * Farsi (Persian) translation * By Mohaqa * 03-10-2007, 06:23 PM */ Ext.onReady(function() { var cm = Ext.ClassManager, exists = Ext.Function.bind(cm.get, cm); if (Ext.Updater) { Ext.Updater.defaults.indicatorText = '<div class="loading-indicator">در حال بارگذاری ...</div>'; } Ext.define("Ext.locale.fa.view.View", { override: "Ext.view.View", emptyText: "" }); Ext.define("Ext.locale.fa.grid.Panel", { override: "Ext.grid.Panel", ddText: "{0} رکورد انتخاب شده" }); Ext.define("Ext.locale.fa.TabPanelItem", { override: "Ext.TabPanelItem", closeText: "بستن" }); Ext.define("Ext.locale.fa.form.field.Base", { override: "Ext.form.field.Base", invalidText: "مقدار فیلد صحیح نیست" }); // changing the msg text below will affect the LoadMask Ext.define("Ext.locale.fa.view.AbstractView", { override: "Ext.view.AbstractView", msg: "در حال بارگذاری ..." }); if (Ext.Date) { Ext.Date.monthNames = ["ژانویه", "فوریه", "مارس", "آپریل", "می", "ژوئن", "جولای", "آگوست", "سپتامبر", "اکتبر", "نوامبر", "دسامبر"]; Ext.Date.monthNumbers = { Jan: 0, Feb: 1, Mar: 2, Apr: 3, May: 4, Jun: 5, Jul: 6, Aug: 7, Sep: 8, Oct: 9, Nov: 10, Dec: 11 }; Ext.Date.dayNames = ["یکشنبه", "دوشنبه", "سه شنبه", "چهارشنبه", "پنجشنبه", "جمعه", "شنبه"]; } if (Ext.MessageBox) { Ext.MessageBox.buttonText = { ok: "تایید", cancel: "بازگشت", yes: "بله", no: "خیر" }; } if (exists('Ext.util.Format')) { Ext.apply(Ext.util.Format, { thousandSeparator: '.', decimalSeparator: ',', currencySign: '\ufdfc', // Iranian Rial dateFormat: 'Y/m/d' }); } Ext.define("Ext.locale.fa.picker.Date", { override: "Ext.picker.Date", todayText: "امروز", minText: "این تاریخ قبل از محدوده مجاز است", maxText: "این تاریخ پس از محدوده مجاز است", disabledDaysText: "", disabledDatesText: "", monthNames: Ext.Date.monthNames, dayNames: Ext.Date.dayNames, nextText: 'ماه بعد (Control + Right)', prevText: 'ماه قبل (Control+Left)', monthYearText: 'یک ماه را انتخاب کنید (Control+Up/Down برای انتقال در سال)', todayTip: "{0} (Spacebar)", format: "y/m/d", startDay: 0 }); Ext.define("Ext.locale.fa.picker.Month", { override: "Ext.picker.Month", okText: "&#160;OK&#160;", cancelText: "Cancel" }); Ext.define("Ext.locale.fa.toolbar.Paging", { override: "Ext.PagingToolbar", beforePageText: "صفحه", afterPageText: "از {0}", firstText: "صفحه اول", prevText: "صفحه قبل", nextText: "صفحه بعد", lastText: "صفحه آخر", refreshText: "بازخوانی", displayMsg: "نمایش {0} - {1} of {2}", emptyMsg: 'داده ای برای نمایش وجود ندارد' }); Ext.define("Ext.locale.fa.form.field.Text", { override: "Ext.form.field.Text", minLengthText: "حداقل طول این فیلد برابر است با {0}", maxLengthText: "حداکثر طول این فیلد برابر است با {0}", blankText: "این فیلد باید مقداری داشته باشد", regexText: "", emptyText: null }); Ext.define("Ext.locale.fa.form.field.Number", { override: "Ext.form.field.Number", minText: "حداقل مقدار این فیلد برابر است با {0}", maxText: "حداکثر مقدار این فیلد برابر است با {0}", nanText: "{0} یک عدد نیست" }); Ext.define("Ext.locale.fa.form.field.Date", { override: "Ext.form.field.Date", disabledDaysText: "غیرفعال", disabledDatesText: "غیرفعال", minText: "تاریخ باید پس از {0} باشد", maxText: "تاریخ باید پس از {0} باشد", invalidText: "{0} تاریخ صحیحی نیست - فرمت صحیح {1}", format: "y/m/d" }); Ext.define("Ext.locale.fa.form.field.ComboBox", { override: "Ext.form.field.ComboBox", valueNotFoundText: undefined }, function() { Ext.apply(Ext.form.field.ComboBox.prototype.defaultListConfig, { loadingText: "در حال بارگذاری ..." }); }); if (exists('Ext.form.field.VTypes')) { Ext.apply(Ext.form.field.VTypes, { emailText: 'مقدار این فیلد باید یک ایمیل با این فرمت باشد "user@example.com"', urlText: 'مقدار این آدرس باید یک آدرس سایت با این فرمت باشد "http:/' + '/www.example.com"', alphaText: 'مقدار این فیلد باید فقط از حروف الفبا و _ تشکیل شده باشد ', alphanumText: 'مقدار این فیلد باید فقط از حروف الفبا، اعداد و _ تشکیل شده باشد' }); } Ext.define("Ext.locale.fa.form.field.HtmlEditor", { override: "Ext.form.field.HtmlEditor", createLinkText: 'لطفا آدرس لینک را وارد کنید:' }, function() { Ext.apply(Ext.form.field.HtmlEditor.prototype, { buttonTips: { bold: { title: 'تیره (Ctrl+B)', text: 'متن انتخاب شده را تیره می کند.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, italic: { title: 'ایتالیک (Ctrl+I)', text: 'متن انتخاب شده را ایتالیک می کند.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, underline: { title: 'زیرخط (Ctrl+U)', text: 'زیر هر نوشته یک خط نمایش می دهد.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, increasefontsize: { title: 'افزایش اندازه', text: 'اندازه فونت را افزایش می دهد.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, decreasefontsize: { title: 'کاهش اندازه', text: 'اندازه متن را کاهش می دهد.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, backcolor: { title: 'رنگ زمینه متن', text: 'برای تغییر رنگ زمینه متن استفاده می شود.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, forecolor: { title: 'رنگ قلم', text: 'رنگ قلم متن را تغییر می دهد.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, justifyleft: { title: 'چیدن متن از سمت چپ', text: 'متن از سمت چپ چیده شده می شود.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, justifycenter: { title: 'متن در وسط ', text: 'نمایش متن در قسمت وسط صفحه و رعابت سمت چپ و راست.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, justifyright: { title: 'چیدن متن از سمت راست', text: 'متن از سمت راست پیده خواهد شد.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, insertunorderedlist: { title: 'لیست همراه با علامت', text: 'یک لیست جدید ایجاد می کند.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, insertorderedlist: { title: 'لیست عددی', text: 'یک لیست عددی ایجاد می کند. ', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, createlink: { title: 'لینک', text: 'متن انتخاب شده را به لینک تبدیل کنید.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, sourceedit: { title: 'ویرایش سورس', text: 'رفتن به حالت ویرایش سورس.', cls: Ext.baseCSSPrefix + 'html-editor-tip' } } }); }); Ext.define("Ext.locale.fa.grid.header.Container", { override: "Ext.grid.header.Container", sortAscText: "مرتب سازی افزایشی", sortDescText: "مرتب سازی کاهشی", lockText: "قفل ستون ها", unlockText: "بازکردن ستون ها", columnsText: "ستون ها" }); Ext.define("Ext.locale.fa.grid.PropertyColumnModel", { override: "Ext.grid.PropertyColumnModel", nameText: "نام", valueText: "مقدار", dateFormat: "Y/m/d" }); });
JavaScript
/** * Romanian translations for ExtJS 2.1 * First released by Lucian Lature on 2007-04-24 * Changed locale for Romania (date formats) as suggested by keypoint * on ExtJS forums: http://www.extjs.com/forum/showthread.php?p=129524#post129524 * Removed some useless parts * Changed by: Emil Cazamir, 2008-04-24 * Fixed some errors left behind * Changed by: Emil Cazamir, 2008-09-01 */ Ext.onReady(function() { var cm = Ext.ClassManager, exists = Ext.Function.bind(cm.get, cm); if (Ext.updater) { Ext.Updater.defaults.indicatorText = '<div class="loading-indicator">Încărcare...</div>'; } Ext.define("Ext.locale.ro.grid.Panel", { override: "Ext.grid.Panel", ddText: "{0} rând(uri) selectate" }); Ext.define("Ext.locale.ro.TabPanelItem", { override: "Ext.TabPanelItem", closeText: "Închide acest tab" }); Ext.define("Ext.locale.ro.form.field.Base", { override: "Ext.form.field.Base", invalidText: "Valoarea acestui câmp este invalidă" }); // changing the msg text below will affect the LoadMask Ext.define("Ext.locale.ro.view.AbstractView", { override: "Ext.view.AbstractView", msg: "Încărcare..." }); if (Ext.Date) { Ext.Date.monthNames = ["Ianuarie", "Februarie", "Martie", "Aprilie", "Mai", "Iunie", "Iulie", "August", "Septembrie", "Octombrie", "Noiembrie", "Decembrie"]; Ext.Date.getShortMonthName = function(month) { return Ext.Date.monthNames[month].substring(0, 3); }; Ext.Date.monthNumbers = { Ian: 0, Feb: 1, Mar: 2, Apr: 3, Mai: 4, Iun: 5, Iul: 6, Aug: 7, Sep: 8, Oct: 9, Noi: 10, Dec: 11 }; Ext.Date.getMonthNumber = function(name) { return Ext.Date.monthNumbers[name.substring(0, 1).toUpperCase() + name.substring(1, 3).toLowerCase()]; }; Ext.Date.dayNames = ["Duminică", "Luni", "Marţi", "Miercuri", "Joi", "Vineri", "Sâmbătă"]; Ext.Date.getShortDayName = function(day) { return Ext.Date.dayNames[day].substring(0, 3); }; } if (Ext.MessageBox) { Ext.MessageBox.buttonText = { ok: "OK", cancel: "Renunţă", yes: "Da", no: "Nu" }; } if (exists('Ext.util.Format')) { Ext.apply(Ext.util.Format, { thousandSeparator: '.', decimalSeparator: ',', currencySign: 'Lei', // Romanian Lei dateFormat: 'd.m.Y' }); } Ext.define("Ext.locale.ro.picker.Date", { override: "Ext.picker.Date", todayText: "Astăzi", minText: "Această dată este anterioară datei minime", maxText: "Această dată este ulterioară datei maxime", disabledDaysText: "", disabledDatesText: "", monthNames: Ext.Date.monthNames, dayNames: Ext.Date.dayNames, nextText: 'Luna următoare (Control+Dreapta)', prevText: 'Luna precedentă (Control+Stânga)', monthYearText: 'Alege o lună (Control+Sus/Jos pentru a parcurge anii)', todayTip: "{0} (Bara spațiu)", format: "d.m.Y", startDay: 0 }); Ext.define("Ext.locale.ro.picker.Month", { override: "Ext.picker.Month", okText: "&#160;OK&#160;", cancelText: "Renunță" }); Ext.define("Ext.locale.ro.toolbar.Paging", { override: "Ext.PagingToolbar", beforePageText: "Pagina", afterPageText: "din {0}", firstText: "Prima pagină", prevText: "Pagina anterioară", nextText: "Pagina următoare", lastText: "Ultima pagină", refreshText: "Împrospătează", displayMsg: "Afișare înregistrările {0} - {1} din {2}", emptyMsg: 'Nu sunt date de afișat' }); Ext.define("Ext.locale.ro.form.field.Text", { override: "Ext.form.field.Text", minLengthText: "Lungimea minimă pentru acest câmp este de {0}", maxLengthText: "Lungimea maximă pentru acest câmp este {0}", blankText: "Acest câmp este obligatoriu", regexText: "", emptyText: null }); Ext.define("Ext.locale.ro.form.field.Number", { override: "Ext.form.field.Number", minText: "Valoarea minimă permisă a acestui câmp este {0}", maxText: "Valaorea maximă permisă a acestui câmp este {0}", nanText: "{0} nu este un număr valid" }); Ext.define("Ext.locale.ro.form.field.Date", { override: "Ext.form.field.Date", disabledDaysText: "Indisponibil", disabledDatesText: "Indisponibil", minText: "Data din această casetă trebuie să fie după {0}", maxText: "Data din această casetă trebuie să fie inainte de {0}", invalidText: "{0} nu este o dată validă, trebuie să fie în formatul {1}", format: "d.m.Y", altFormats: "d-m-Y|d.m.y|d-m-y|d.m|d-m|dm|d|Y-m-d" }); Ext.define("Ext.locale.ro.form.field.ComboBox", { override: "Ext.form.field.ComboBox", valueNotFoundText: undefined }, function() { Ext.apply(Ext.form.field.ComboBox.prototype.defaultListConfig, { loadingText: "Încărcare..." }); }); if (exists('Ext.form.field.VTypes')) { Ext.apply(Ext.form.field.VTypes, { emailText: 'Acest câmp trebuie să conţină o adresă de e-mail în formatul "user@domeniu.com"', urlText: 'Acest câmp trebuie să conţină o adresă URL în formatul "http:/' + '/www.domeniu.com"', alphaText: 'Acest câmp trebuie să conţină doar litere şi _', alphanumText: 'Acest câmp trebuie să conţină doar litere, cifre şi _' }); } Ext.define("Ext.locale.ro.form.field.HtmlEditor", { override: "Ext.form.field.HtmlEditor", createLinkText: 'Vă rugăm introduceti un URL pentru această legătură web:' }, function() { Ext.apply(Ext.form.field.HtmlEditor.prototype, { buttonTips: { bold: { title: 'Îngroşat (Ctrl+B)', text: 'Îngroşati caracterele textului selectat.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, italic: { title: 'Înclinat (Ctrl+I)', text: 'Înclinaţi caracterele textului selectat.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, underline: { title: 'Subliniat (Ctrl+U)', text: 'Subliniaţi caracterele textului selectat.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, increasefontsize: { title: 'Mărit', text: 'Măreşte dimensiunea fontului.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, decreasefontsize: { title: 'Micşorat', text: 'Micşorează dimensiunea textului.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, backcolor: { title: 'Culoarea fundalului', text: 'Schimbă culoarea fundalului pentru textul selectat.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, forecolor: { title: 'Culoarea textului', text: 'Schimbă culoarea textului selectat.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, justifyleft: { title: 'Aliniat la stânga', text: 'Aliniază textul la stânga.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, justifycenter: { title: 'Centrat', text: 'Centrează textul în editor.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, justifyright: { title: 'Aliniat la dreapta', text: 'Aliniază textul la dreapta.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, insertunorderedlist: { title: 'Listă cu puncte', text: 'Inserează listă cu puncte.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, insertorderedlist: { title: 'Listă numerotată', text: 'Inserează o listă numerotată.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, createlink: { title: 'Legătură web', text: 'Transformă textul selectat în legătură web.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, sourceedit: { title: 'Editare sursă', text: 'Schimbă pe modul de editare al codului HTML.', cls: Ext.baseCSSPrefix + 'html-editor-tip' } } }); }); Ext.define("Ext.locale.ro.grid.header.Container", { override: "Ext.grid.header.Container", sortAscText: "Sortare ascendentă", sortDescText: "Sortare descendentă", lockText: "Blochează coloana", unlockText: "Deblochează coloana", columnsText: "Coloane" }); Ext.define("Ext.locale.ro.grid.GroupingFeature", { override: "Ext.grid.GroupingFeature", emptyGroupText: '(Fără)', groupByText: 'Grupează după această coloană', showGroupsText: 'Afișează grupat' }); Ext.define("Ext.locale.ro.grid.PropertyColumnModel", { override: "Ext.grid.PropertyColumnModel", nameText: "Nume", valueText: "Valoare", dateFormat: "d.m.Y" }); });
JavaScript
/** * Portuguese/Portugal (pt_PT) Translation * by Nuno Franco da Costa - francodacosta.com * translated from ext-lang-en.js */ Ext.onReady(function() { var cm = Ext.ClassManager, exists = Ext.Function.bind(cm.get, cm); if (Ext.Updater) { Ext.Updater.defaults.indicatorText = '<div class="loading-indicator">A carregar...</div>'; } Ext.define("Ext.locale.pt_PT.view.View", { override: "Ext.view.View", emptyText: "" }); Ext.define("Ext.locale.pt_PT.grid.Panel", { override: "Ext.grid.Panel", ddText: "{0} linha(s) seleccionada(s)" }); Ext.define("Ext.locale.pt_PT.TabPanelItem", { override: "Ext.TabPanelItem", closeText: "Fechar aba" }); // changing the msg text below will affect the LoadMask Ext.define("Ext.locale.pt_PT.view.AbstractView", { override: "Ext.view.AbstractView", msg: "A carregar..." }); if (Ext.Date) { Ext.Date.monthNames = ["Janeiro", "Fevereiro", "Mar&ccedil;o", "Abril", "Maio", "Junho", "Julho", "Agosto", "Setembro", "Outubro", "Novembro", "Dezembro"]; Ext.Date.getShortMonthName = function(month) { return Ext.Date.monthNames[month].substring(0, 3); }; Ext.Date.monthNumbers = { Jan: 0, Feb: 1, Mar: 2, Apr: 3, May: 4, Jun: 5, Jul: 6, Aug: 7, Sep: 8, Oct: 9, Nov: 10, Dec: 11 }; Ext.Date.getMonthNumber = function(name) { return Ext.Date.monthNumbers[name.substring(0, 1).toUpperCase() + name.substring(1, 3).toLowerCase()]; }; Ext.Date.dayNames = ["Domingo", "Segunda", "Ter&ccedil;a", "Quarta", "Quinta", "Sexta", "Sabado"]; Ext.Date.getShortDayName = function(day) { return Ext.Date.dayNames[day].substring(0, 3); }; } if (Ext.MessageBox) { Ext.MessageBox.buttonText = { ok: "OK", cancel: "Cancelar", yes: "Sim", no: "N&atilde;o" }; } if (exists('Ext.util.Format')) { Ext.apply(Ext.util.Format, { thousandSeparator: '.', decimalSeparator: ',', currencySign: '\u20ac', // Portugese Euro dateFormat: 'Y/m/d' }); } Ext.define("Ext.locale.pt_PT.picker.Date", { override: "Ext.picker.Date", todayText: "Hoje", minText: "A data &eacute; anterior ao m&iacute;nimo definido", maxText: "A data &eacute; posterior ao m&aacute;ximo definido", disabledDaysText: "", disabledDatesText: "", monthNames: Ext.Date.monthNames, dayNames: Ext.Date.dayNames, nextText: 'M&ecirc;s Seguinte (Control+Right)', prevText: 'M&ecirc;s Anterior (Control+Left)', monthYearText: 'Escolha um m&ecirc;s (Control+Up/Down ava&ccedil;ar/recuar anos)', todayTip: "{0} (barra de espa&ccedil;o)", format: "y/m/d", startDay: 0 }); Ext.define("Ext.locale.pt_PT.picker.Month", { override: "Ext.picker.Month", okText: "&#160;OK&#160;", cancelText: "Cancelar" }); Ext.define("Ext.locale.pt_PT.toolbar.Paging", { override: "Ext.PagingToolbar", beforePageText: "P&aacute;gina", afterPageText: "de {0}", firstText: "Primeira P&aacute;gina", prevText: "P&aacute;gina Anterior", nextText: "Pr%oacute;xima P&aacute;gina", lastText: "&Uacute;ltima P&aacute;gina", refreshText: "Recaregar", displayMsg: "A mostrar {0} - {1} de {2}", emptyMsg: 'Sem dados para mostrar' }); Ext.define("Ext.locale.pt_PT.form.field.Base", { override: "Ext.form.field.Base", invalidText: "O valor deste campo &eacute; inv&aacute;lido" }); Ext.define("Ext.locale.pt_PT.form.field.Text", { override: "Ext.form.field.Text", minLengthText: "O comprimento m&iacute;nimo deste campo &eaute; {0}", maxLengthText: "O comprimento m&aacute;ximo deste campo &eaute; {0}", blankText: "Este campo &eacute; de preenchimento obrigat&oacute;rio", regexText: "", emptyText: null }); Ext.define("Ext.locale.pt_PT.form.field.Number", { override: "Ext.form.field.Number", minText: "O valor m&iacute;nimo deste campo &eaute; {0}", maxText: "O valor m&aacute;ximo deste campo &eaute; {0}", nanText: "{0} n&atilde;o &eacute; um numero" }); Ext.define("Ext.locale.pt_PT.form.field.Date", { override: "Ext.form.field.Date", disabledDaysText: "Desabilitado", disabledDatesText: "Desabilitado", minText: "A data deste campo deve ser posterior a {0}", maxText: "A data deste campo deve ser anterior a {0}", invalidText: "{0} n&atilde;o &eacute; uma data v&aacute;lida - deve estar no seguinte formato{1}", format: "y/m/d", altFormats: "m/d/Y|m-d-y|m-d-Y|m/d|m-d|md|mdy|mdY|d|Y-m-d" }); Ext.define("Ext.locale.pt_PT.form.field.ComboBox", { override: "Ext.form.field.ComboBox", valueNotFoundText: undefined }, function() { Ext.apply(Ext.form.field.ComboBox.prototype.defaultListConfig, { loadingText: "A Carregar..." }); }); if (exists('Ext.form.field.VTypes')) { Ext.apply(Ext.form.field.VTypes, { emailText: 'Este campo deve ser um endere&ccedil;o de email no formato "utilizador@dominio.com"', urlText: 'Este campo deve ser um URL no formato "http:/' + '/www.dominio.com"', alphaText: 'Este campo deve conter apenas letras e _', alphanumText: 'Este campo deve conter apenas letras, n&uacute;meros e _' }); } Ext.define("Ext.locale.pt_PT.form.field.HtmlEditor", { override: "Ext.form.field.HtmlEditor", createLinkText: 'Indique o endere&ccedil;o do link:' }, function() { Ext.apply(Ext.form.field.HtmlEditor.prototype, { buttonTips: { bold: { title: 'Negrito (Ctrl+B)', text: 'Transforma o texto em Negrito.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, italic: { title: 'It&aacute;lico (Ctrl+I)', text: 'Transforma o texto em it&aacute;lico.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, underline: { title: 'Sublinhar (Ctrl+U)', text: 'Sublinha o texto.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, increasefontsize: { title: 'Aumentar texto', text: 'Aumenta o tamanho da fonte.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, decreasefontsize: { title: 'Encolher texto', text: 'Diminui o tamanho da fonte.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, backcolor: { title: 'C&ocirc;r de fundo do texto', text: 'Altera a c&ocirc;r de fundo do texto.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, forecolor: { title: 'C&ocirc;r do texo', text: 'Altera a a&ocirc;r do texo.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, justifyleft: { title: 'ALinhar &agrave; esquerda', text: 'ALinha o texto &agrave; esquerda.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, justifycenter: { title: 'Centrar', text: 'Centra o texto.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, justifyright: { title: 'ALinhar &agrave; direita', text: 'ALinha o texto &agravce; direita.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, insertunorderedlist: { title: 'Lista', text: 'Inicia uma lista.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, insertorderedlist: { title: 'Lista Numerada', text: 'Inicia uma lista numerada.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, createlink: { title: 'Hyperlink', text: 'Transforma o texto num hyperlink.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, sourceedit: { title: 'Editar c&oacute;digo', text: 'Alterar para o modo de edi&ccedil;&atilde;o de c&oacute;digo.', cls: Ext.baseCSSPrefix + 'html-editor-tip' } } }); }); Ext.define("Ext.locale.pt_PT.form.Basic", { override: "Ext.form.Basic", waitTitle: "Por favor espere..." }); Ext.define("Ext.locale.pt_PT.grid.header.Container", { override: "Ext.grid.header.Container", sortAscText: "Ordena&ccedil;&atilde;o Crescente", sortDescText: "Ordena&ccedil;&atilde;o Decrescente", lockText: "Fixar Coluna", unlockText: "Libertar Coluna", columnsText: "Colunas" }); Ext.define("Ext.locale.pt_PT.grid.GroupingFeature", { override: "Ext.grid.GroupingFeature", emptyGroupText: '(Nenhum)', groupByText: 'Agrupar por este campo', showGroupsText: 'Mostrar nos Grupos' }); Ext.define("Ext.locale.pt_PT.grid.PropertyColumnModel", { override: "Ext.grid.PropertyColumnModel", nameText: "Nome", valueText: "Valor", dateFormat: "Y/j/m" }); });
JavaScript
/** * Ukrainian translations for ExtJS (UTF-8 encoding) * * Original translation by zlatko * 3 October 2007 * * Updated by dev.ashevchuk@gmail.com * 01.09.2009 */ Ext.onReady(function() { var cm = Ext.ClassManager, exists = Ext.Function.bind(cm.get, cm); if (Ext.Updater) { Ext.Updater.defaults.indicatorText = '<div class="loading-indicator">Завантаження...</div>'; } Ext.define("Ext.locale.ukr.view.View", { override: "Ext.view.View", emptyText: "<Порожньо>" }); Ext.define("Ext.locale.ukr.grid.Panel", { override: "Ext.grid.Panel", ddText: "{0} обраних рядків" }); Ext.define("Ext.locale.ukr.TabPanelItem", { override: "Ext.TabPanelItem", closeText: "Закрити цю вкладку" }); Ext.define("Ext.locale.ukr.form.field.Base", { override: "Ext.form.field.Base", invalidText: "Хибне значення" }); // changing the msg text below will affect the LoadMask Ext.define("Ext.locale.ukr.view.AbstractView", { override: "Ext.view.AbstractView", msg: "Завантаження..." }); if (Ext.Date) { Ext.Date.monthNames = ["Січень", "Лютий", "Березень", "Квітень", "Травень", "Червень", "Липень", "Серпень", "Вересень", "Жовтень", "Листопад", "Грудень"]; Ext.Date.dayNames = ["Неділя", "Понеділок", "Вівторок", "Середа", "Четвер", "П’ятниця", "Субота"]; } if (Ext.MessageBox) { Ext.MessageBox.buttonText = { ok: "OK", cancel: "Відміна", yes: "Так", no: "Ні" }; } if (exists('Ext.util.Format')) { Ext.apply(Ext.util.Format, { thousandSeparator: '.', decimalSeparator: ',', currencySign: '\u20b4', // Ukranian Hryvnia dateFormat: 'd.m.Y' }); } Ext.define("Ext.locale.ukr.picker.Date", { override: "Ext.picker.Date", todayText: "Сьогодні", minText: "Ця дата меньша за мінімальну допустиму дату", maxText: "Ця дата більша за максимальну допустиму дату", disabledDaysText: "", disabledDatesText: "", monthNames: Ext.Date.monthNames, dayNames: Ext.Date.dayNames, nextText: 'Наступний місяць (Control+Вправо)', prevText: 'Попередній місяць (Control+Вліво)', monthYearText: 'Вибір місяця (Control+Вверх/Вниз для вибору року)', todayTip: "{0} (Пробіл)", format: "d.m.y", startDay: 1 }); Ext.define("Ext.locale.ukr.picker.Month", { override: "Ext.picker.Month", okText: "&#160;OK&#160;", cancelText: "Відміна" }); Ext.define("Ext.locale.ukr.toolbar.Paging", { override: "Ext.PagingToolbar", beforePageText: "Сторінка", afterPageText: "з {0}", firstText: "Перша сторінка", prevText: "Попередня сторінка", nextText: "Наступна сторінка", lastText: "Остання сторінка", refreshText: "Освіжити", displayMsg: "Відображення записів з {0} по {1}, всього {2}", emptyMsg: 'Дані для відображення відсутні' }); Ext.define("Ext.locale.ukr.form.field.Text", { override: "Ext.form.field.Text", minLengthText: "Мінімальна довжина цього поля {0}", maxLengthText: "Максимальна довжина цього поля {0}", blankText: "Це поле є обов’язковим для заповнення", regexText: "", emptyText: null }); Ext.define("Ext.locale.ukr.form.field.Number", { override: "Ext.form.field.Number", minText: "Значення у цьому полі не може бути меньше {0}", maxText: "Значення у цьому полі не може бути більше {0}", nanText: "{0} не є числом" }); Ext.define("Ext.locale.ukr.form.field.Date", { override: "Ext.form.field.Date", disabledDaysText: "Не доступно", disabledDatesText: "Не доступно", minText: "Дата у цьому полі повинна бути більша {0}", maxText: "Дата у цьому полі повинна бути меньша {0}", invalidText: "{0} хибна дата - дата повинна бути вказана у форматі {1}", format: "d.m.y" }); Ext.define("Ext.locale.ukr.form.field.ComboBox", { override: "Ext.form.field.ComboBox", valueNotFoundText: undefined }, function() { Ext.apply(Ext.form.field.ComboBox.prototype.defaultListConfig, { loadingText: "Завантаження..." }); }); if (exists('Ext.form.field.VTypes')) { Ext.apply(Ext.form.field.VTypes, { emailText: 'Це поле повинно містити адресу електронної пошти у форматі "user@example.com"', urlText: 'Це поле повинно містити URL у форматі "http:/' + '/www.example.com"', alphaText: 'Це поле повинно містити виключно латинські літери та символ підкреслення "_"', alphanumText: 'Це поле повинно містити виключно латинські літери, цифри та символ підкреслення "_"' }); } Ext.define("Ext.locale.ukr.form.field.HtmlEditor", { override: "Ext.form.field.HtmlEditor", createLinkText: 'Будь-ласка введіть адресу:' }, function() { Ext.apply(Ext.form.field.HtmlEditor.prototype, { buttonTips: { bold: { title: 'Напівжирний (Ctrl+B)', text: 'Зробити напівжирним виділений текст.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, italic: { title: 'Курсив (Ctrl+I)', text: 'Зробити курсивом виділений текст.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, underline: { title: 'Підкреслений (Ctrl+U)', text: 'Зробити підкресленим виділений текст.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, increasefontsize: { title: 'Збільшити розмір', text: 'Збільшити розмір шрифта.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, decreasefontsize: { title: 'Зменьшити розмір', text: 'Зменьшити розмір шрифта.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, backcolor: { title: 'Заливка', text: 'Змінити колір фону для виділеного тексту або абзацу.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, forecolor: { title: 'Колір тексту', text: 'Змінити колір виділеного тексту або абзацу.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, justifyleft: { title: 'Вирівняти текст по лівому полю', text: 'Вирівнювання тексту по лівому полю.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, justifycenter: { title: 'Вирівняти текст по центру', text: 'Вирівнювання тексту по центру.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, justifyright: { title: 'Вирівняти текст по правому полю', text: 'Вирівнювання тексту по правому полю.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, insertunorderedlist: { title: 'Маркери', text: 'Почати маркований список.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, insertorderedlist: { title: 'Нумерація', text: 'Почати нумернований список.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, createlink: { title: 'Вставити гіперпосилання', text: 'Створення посилання із виділеного тексту.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, sourceedit: { title: 'Джерельний код', text: 'Режим редагування джерельного коду.', cls: Ext.baseCSSPrefix + 'html-editor-tip' } } }); }); Ext.define("Ext.locale.ukr.grid.header.Container", { override: "Ext.grid.header.Container", sortAscText: "Сортувати по зростанню", sortDescText: "Сортувати по спаданню", lockText: "Закріпити стовпець", unlockText: "Відкріпити стовпець", columnsText: "Стовпці" }); Ext.define("Ext.locale.ukr.grid.PropertyColumnModel", { override: "Ext.grid.PropertyColumnModel", nameText: "Назва", valueText: "Значення", dateFormat: "j.m.Y" }); });
JavaScript
 /** * Traditional Chinese translation * By hata1234 * 09 April 2007 */ Ext.onReady(function() { var cm = Ext.ClassManager, exists = Ext.Function.bind(cm.get, cm), parseCodes; if (Ext.Updater) { Ext.Updater.defaults.indicatorText = '<div class="loading-indicator">讀取中...</div>'; } Ext.define("Ext.locale.zh_TW.view.View", { override: "Ext.view.View", emptyText: "" }); Ext.define("Ext.locale.zh_TW.grid.Panel", { override: "Ext.grid.Panel", ddText: "選擇了 {0} 行" }); Ext.define("Ext.locale.zh_TW.TabPanelItem", { override: "Ext.TabPanelItem", closeText: "關閉此標籤" }); Ext.define("Ext.locale.zh_TW.form.field.Base", { override: "Ext.form.field.Base", invalidText: "數值不符合欄位規定" }); // changing the msg text below will affect the LoadMask Ext.define("Ext.locale.zh_TW.view.AbstractView", { override: "Ext.view.AbstractView", msg: "讀取中..." }); if (Ext.Date) { Ext.Date.monthNames = ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"]; Ext.Date.dayNames = ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"]; Ext.Date.formatCodes.a = "(this.getHours() < 12 ? '上午' : '下午')"; Ext.Date.formatCodes.A = "(this.getHours() < 12 ? '上午' : '下午')"; parseCodes = { g: 1, c: "if (/(上午)/i.test(results[{0}])) {\n" + "if (!h || h == 12) { h = 0; }\n" + "} else { if (!h || h < 12) { h = (h || 0) + 12; }}", s: "(上午|下午)", calcAtEnd: true }; Ext.Date.parseCodes.a = Ext.Date.parseCodes.A = parseCodes; } if (Ext.MessageBox) { Ext.MessageBox.buttonText = { ok: "確定", cancel: "取消", yes: "是", no: "否" }; } if (exists('Ext.util.Format')) { Ext.apply(Ext.util.Format, { thousandSeparator: ',', decimalSeparator: '.', currencySign: '\u00a5', // Chinese Yuan dateFormat: 'Y/m/d' }); } Ext.define("Ext.locale.zh_TW.picker.Date", { override: "Ext.picker.Date", todayText: "今天", minText: "日期必須大於最小容許日期", maxText: "日期必須小於最大容許日期", disabledDaysText: "", disabledDatesText: "", monthNames: Ext.Date.monthNames, dayNames: Ext.Date.dayNames, nextText: "下個月 (Ctrl+右方向鍵)", prevText: "上個月 (Ctrl+左方向鍵)", monthYearText: "選擇月份 (Ctrl+上/下方向鍵選擇年份)", format: "y/m/d", ariaTitle: '{0}', ariaTitleDateFormat: 'Y\u5e74m\u6708d\u65e5', longDayFormat: 'Y\u5e74m\u6708d\u65e5', monthYearFormat: 'Y\u5e74m\u6708', getDayInitial: function (value) { // Grab the last character return value.substr(value.length - 1); } }); Ext.define("Ext.locale.zh_TW.picker.Month", { override: "Ext.picker.Month", okText: "确定", cancelText: "取消" }); Ext.define("Ext.locale.zh_TW.toolbar.Paging", { override: "Ext.PagingToolbar", beforePageText: "第", afterPageText: "頁,共{0}頁", firstText: "第一頁", prevText: "上一頁", nextText: "下一頁", lastText: "最後頁", refreshText: "重新整理", displayMsg: "顯示{0} - {1}筆,共{2}筆", emptyMsg: '沒有任何資料' }); Ext.define("Ext.locale.zh_TW.form.field.Text", { override: "Ext.form.field.Text", minLengthText: "此欄位最少要輸入 {0} 個字", maxLengthText: "此欄位最多輸入 {0} 個字", blankText: "此欄位為必填", regexText: "", emptyText: null }); Ext.define("Ext.locale.zh_TW.form.field.Number", { override: "Ext.form.field.Number", minText: "此欄位之數值必須大於 {0}", maxText: "此欄位之數值必須小於 {0}", nanText: "{0} 不是合法的數字" }); Ext.define("Ext.locale.zh_TW.form.field.Date", { override: "Ext.form.field.Date", disabledDaysText: "無法使用", disabledDatesText: "無法使用", minText: "此欄位之日期必須在 {0} 之後", maxText: "此欄位之日期必須在 {0} 之前", invalidText: "{0} 不是正確的日期格式 - 必須像是 「 {1} 」 這樣的格式", format: "Y/m/d" }); Ext.define("Ext.locale.zh_TW.form.field.ComboBox", { override: "Ext.form.field.ComboBox", valueNotFoundText: undefined }, function() { Ext.apply(Ext.form.field.ComboBox.prototype.defaultListConfig, { loadingText: "讀取中 ..." }); }); if (exists('Ext.form.field.VTypes')) { Ext.apply(Ext.form.field.VTypes, { emailText: '此欄位必須輸入像 "user@example.com" 之E-Mail格式', urlText: '此欄位必須輸入像 "http:/' + '/www.example.com" 之網址格式', alphaText: '此欄位僅能輸入半形英文字母及底線( _ )符號', alphanumText: '此欄位僅能輸入半形英文字母、數字及底線( _ )符號' }); } Ext.define("Ext.locale.zh_TW.grid.header.Container", { override: "Ext.grid.header.Container", sortAscText: "正向排序", sortDescText: "反向排序", lockText: "鎖定欄位", unlockText: "解開欄位鎖定", columnsText: "欄位" }); Ext.define("Ext.locale.zh_TW.grid.PropertyColumnModel", { override: "Ext.grid.PropertyColumnModel", nameText: "名稱", valueText: "數值", dateFormat: "Y/m/d" }); });
JavaScript
 /** * Russian translation * By ZooKeeper (utf-8 encoding) * 6 November 2007 */ Ext.onReady(function() { var cm = Ext.ClassManager, exists = Ext.Function.bind(cm.get, cm); if (Ext.Updater) { Ext.Updater.defaults.indicatorText = '<div class="loading-indicator">Идет загрузка...</div>'; } Ext.define("Ext.locale.ru.view.View", { override: "Ext.view.View", emptyText: "" }); Ext.define("Ext.locale.ru.grid.Panel", { override: "Ext.grid.Panel", ddText: "{0} выбранных строк" }); Ext.define("Ext.locale.ru.TabPanelItem", { override: "Ext.TabPanelItem", closeText: "Закрыть эту вкладку" }); Ext.define("Ext.locale.ru.form.field.Base", { override: "Ext.form.field.Base", invalidText: "Значение в этом поле неверное" }); // changing the msg text below will affect the LoadMask Ext.define("Ext.locale.ru.view.AbstractView", { override: "Ext.view.AbstractView", msg: "Загрузка..." }); if (Ext.Date) { Ext.Date.monthNames = ["Январь", "Февраль", "Март", "Апрель", "Май", "Июнь", "Июль", "Август", "Сентябрь", "Октябрь", "Ноябрь", "Декабрь"]; Ext.Date.shortMonthNames = ["Янв", "Февр", "Март", "Апр", "Май", "Июнь", "Июль", "Авг", "Сент", "Окт", "Нояб", "Дек"]; Ext.Date.getShortMonthName = function(month) { return Ext.Date.shortMonthNames[month]; }; Ext.Date.monthNumbers = { 'Янв': 0, 'Фев': 1, 'Мар': 2, 'Апр': 3, 'Май': 4, 'Июн': 5, 'Июл': 6, 'Авг': 7, 'Сен': 8, 'Окт': 9, 'Ноя': 10, 'Дек': 11 }; Ext.Date.getMonthNumber = function(name) { return Ext.Date.monthNumbers[name.substring(0, 1).toUpperCase() + name.substring(1, 3).toLowerCase()]; }; Ext.Date.dayNames = ["Воскресенье", "Понедельник", "Вторник", "Среда", "Четверг", "Пятница", "Суббота"]; Ext.Date.getShortDayName = function(day) { return Ext.Date.dayNames[day].substring(0, 3); }; } if (Ext.MessageBox) { Ext.MessageBox.buttonText = { ok: "OK", cancel: "Отмена", yes: "Да", no: "Нет" }; } if (exists('Ext.util.Format')) { Ext.apply(Ext.util.Format, { thousandSeparator: '.', decimalSeparator: ',', currencySign: '\u0440\u0443\u0431', // Russian Ruble dateFormat: 'd.m.Y' }); } Ext.define("Ext.locale.ru.picker.Date", { override: "Ext.picker.Date", todayText: "Сегодня", minText: "Эта дата раньше минимальной даты", maxText: "Эта дата позже максимальной даты", disabledDaysText: "", disabledDatesText: "", monthNames: Ext.Date.monthNames, dayNames: Ext.Date.dayNames, nextText: 'Следующий месяц (Control+Вправо)', prevText: 'Предыдущий месяц (Control+Влево)', monthYearText: 'Выбор месяца (Control+Вверх/Вниз для выбора года)', todayTip: "{0} (Пробел)", format: "d.m.y", startDay: 1 }); Ext.define("Ext.locale.ru.picker.Month", { override: "Ext.picker.Month", okText: "&#160;OK&#160;", cancelText: "Отмена" }); Ext.define("Ext.locale.ru.toolbar.Paging", { override: "Ext.PagingToolbar", beforePageText: "Страница", afterPageText: "из {0}", firstText: "Первая страница", prevText: "Предыдущая страница", nextText: "Следующая страница", lastText: "Последняя страница", refreshText: "Обновить", displayMsg: "Отображаются записи с {0} по {1}, всего {2}", emptyMsg: 'Нет данных для отображения' }); Ext.define("Ext.locale.ru.form.field.Text", { override: "Ext.form.field.Text", minLengthText: "Минимальная длина этого поля {0}", maxLengthText: "Максимальная длина этого поля {0}", blankText: "Это поле обязательно для заполнения", regexText: "", emptyText: null }); Ext.define("Ext.locale.ru.form.field.Number", { override: "Ext.form.field.Number", minText: "Значение этого поля не может быть меньше {0}", maxText: "Значение этого поля не может быть больше {0}", nanText: "{0} не является числом" }); Ext.define("Ext.locale.ru.form.field.Date", { override: "Ext.form.field.Date", disabledDaysText: "Не доступно", disabledDatesText: "Не доступно", minText: "Дата в этом поле должна быть позде {0}", maxText: "Дата в этом поле должна быть раньше {0}", invalidText: "{0} не является правильной датой - дата должна быть указана в формате {1}", format: "d.m.y", altFormats: "d.m.y|d/m/Y|d-m-y|d-m-Y|d/m|d-m|dm|dmy|dmY|d|Y-m-d" }); Ext.define("Ext.locale.ru.form.field.ComboBox", { override: "Ext.form.field.ComboBox", valueNotFoundText: undefined }, function() { Ext.apply(Ext.form.field.ComboBox.prototype.defaultListConfig, { loadingText: "Загрузка..." }); }); if (exists('Ext.form.field.VTypes')) { Ext.apply(Ext.form.field.VTypes, { emailText: 'Это поле должно содержать адрес электронной почты в формате "user@example.com"', urlText: 'Это поле должно содержать URL в формате "http:/' + '/www.example.com"', alphaText: 'Это поле должно содержать только латинские буквы и символ подчеркивания "_"', alphanumText: 'Это поле должно содержать только латинские буквы, цифры и символ подчеркивания "_"' }); } Ext.define("Ext.locale.ru.form.field.HtmlEditor", { override: "Ext.form.field.HtmlEditor", createLinkText: 'Пожалуйста введите адрес:' }, function() { Ext.apply(Ext.form.field.HtmlEditor.prototype, { buttonTips: { bold: { title: 'Полужирный (Ctrl+B)', text: 'Применение полужирного начертания к выделенному тексту.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, italic: { title: 'Курсив (Ctrl+I)', text: 'Применение курсивного начертания к выделенному тексту.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, underline: { title: 'Подчёркнутый (Ctrl+U)', text: 'Подчёркивание выделенного текста.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, increasefontsize: { title: 'Увеличить размер', text: 'Увеличение размера шрифта.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, decreasefontsize: { title: 'Уменьшить размер', text: 'Уменьшение размера шрифта.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, backcolor: { title: 'Заливка', text: 'Изменение цвета фона для выделенного текста или абзаца.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, forecolor: { title: 'Цвет текста', text: 'Измение цвета текста.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, justifyleft: { title: 'Выровнять текст по левому краю', text: 'Выровнивание текста по левому краю.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, justifycenter: { title: 'По центру', text: 'Выровнивание текста по центру.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, justifyright: { title: 'Выровнять текст по правому краю', text: 'Выровнивание текста по правому краю.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, insertunorderedlist: { title: 'Маркеры', text: 'Начать маркированный список.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, insertorderedlist: { title: 'Нумерация', text: 'Начать нумернованный список.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, createlink: { title: 'Вставить гиперссылку', text: 'Создание ссылки из выделенного текста.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, sourceedit: { title: 'Исходный код', text: 'Переключиться на исходный код.', cls: Ext.baseCSSPrefix + 'html-editor-tip' } } }); }); Ext.define("Ext.locale.ru.form.Basic", { override: "Ext.form.Basic", waitTitle: "Пожалуйста подождите..." }); Ext.define("Ext.locale.ru.grid.header.Container", { override: "Ext.grid.header.Container", sortAscText: "Сортировать по возрастанию", sortDescText: "Сортировать по убыванию", lockText: "Закрепить столбец", unlockText: "Снять закрепление столбца", columnsText: "Столбцы" }); Ext.define("Ext.locale.ru.grid.GroupingFeature", { override: "Ext.grid.GroupingFeature", emptyGroupText: '(Пусто)', groupByText: 'Группировать по этому полю', showGroupsText: 'Отображать по группам' }); Ext.define("Ext.locale.ru.grid.PropertyColumnModel", { override: "Ext.grid.PropertyColumnModel", nameText: "Название", valueText: "Значение", dateFormat: "d.m.Y" }); Ext.define("Ext.locale.ru.SplitLayoutRegion", { override: "Ext.SplitLayoutRegion", splitTip: "Тяните для изменения размера.", collapsibleSplitTip: "Тяните для изменения размера. Двойной щелчок спрячет панель." }); });
JavaScript
/** * Portuguese/Brazil Translation by Weber Souza * 08 April 2007 * Updated by Allan Brazute Alves (EthraZa) * 06 September 2007 * Adapted to European Portuguese by Helder Batista (hbatista) * 31 January 2008 */ Ext.onReady(function() { var cm = Ext.ClassManager, exists = Ext.Function.bind(cm.get, cm); if (Ext.Updater) { Ext.Updater.defaults.indicatorText = '<div class="loading-indicator">Carregando...</div>'; } Ext.define("Ext.locale.pt.view.View", { override: "Ext.view.View", emptyText: "" }); Ext.define("Ext.locale.pt.grid.Panel", { override: "Ext.grid.Panel", ddText: "{0} linha(s) seleccionada(s)" }); Ext.define("Ext.locale.pt.TabPanelItem", { override: "Ext.TabPanelItem", closeText: "Fechar" }); Ext.define("Ext.locale.pt.form.field.Base", { override: "Ext.form.field.Base", invalidText: "O valor para este campo &eacute; inv&aacute;lido" }); // changing the msg text below will affect the LoadMask Ext.define("Ext.locale.pt.view.AbstractView", { override: "Ext.view.AbstractView", msg: "Carregando..." }); if (Ext.Date) { Ext.Date.monthNames = ["Janeiro", "Fevereiro", "Mar&ccedil;o", "Abril", "Maio", "Junho", "Julho", "Agosto", "Setembro", "Outubro", "Novembro", "Dezembro"]; Ext.Date.dayNames = ["Domingo", "Segunda", "Ter&ccedil;a", "Quarta", "Quinta", "Sexta", "S&aacute;bado"]; } if (Ext.MessageBox) { Ext.MessageBox.buttonText = { ok: "OK", cancel: "Cancelar", yes: "Sim", no: "N&atilde;o" }; } if (exists('Ext.util.Format')) { Ext.apply(Ext.util.Format, { thousandSeparator: '.', decimalSeparator: ',', currencySign: '\u20ac', // Portugese Euro dateFormat: 'd/m/Y' }); } Ext.define("Ext.locale.pt.picker.Date", { override: "Ext.picker.Date", todayText: "Hoje", minText: "Esta data &eacute; anterior &agrave; menor data", maxText: "Esta data &eacute; posterior &agrave; maior data", disabledDaysText: "", disabledDatesText: "", monthNames: Ext.Date.monthNames, dayNames: Ext.Date.dayNames, nextText: 'Pr&oacute;ximo M&ecirc;s (Control+Direita)', prevText: 'M&ecirc;s Anterior (Control+Esquerda)', monthYearText: 'Escolha um M&ecirc;s (Control+Cima/Baixo para mover entre os anos)', todayTip: "{0} (Espa&ccedil;o)", format: "d/m/Y", startDay: 0 }); Ext.define("Ext.locale.pt.picker.Month", { override: "Ext.picker.Month", okText: "&#160;OK&#160;", cancelText: "Cancelar" }); Ext.define("Ext.locale.pt.toolbar.Paging", { override: "Ext.PagingToolbar", beforePageText: "P&aacute;gina", afterPageText: "de {0}", firstText: "Primeira P&aacute;gina", prevText: "P&aacute;gina Anterior", nextText: "Pr&oacute;xima P&aacute;gina", lastText: "&Uacute;ltima P&aacute;gina", refreshText: "Atualizar", displayMsg: "<b>{0} &agrave; {1} de {2} registo(s)</b>", emptyMsg: 'Sem registos para exibir' }); Ext.define("Ext.locale.pt.form.field.Text", { override: "Ext.form.field.Text", minLengthText: "O tamanho m&iacute;nimo para este campo &eacute; {0}", maxLengthText: "O tamanho m&aacute;ximo para este campo &eacute; {0}", blankText: "Este campo &eacute; obrigat&oacute;rio.", regexText: "", emptyText: null }); Ext.define("Ext.locale.pt.form.field.Number", { override: "Ext.form.field.Number", minText: "O valor m&iacute;nimo para este campo &eacute; {0}", maxText: "O valor m&aacute;ximo para este campo &eacute; {0}", nanText: "{0} n&atilde;o &eacute; um n&uacute;mero v&aacute;lido" }); Ext.define("Ext.locale.pt.form.field.Date", { override: "Ext.form.field.Date", disabledDaysText: "Desabilitado", disabledDatesText: "Desabilitado", minText: "A data deste campo deve ser posterior a {0}", maxText: "A data deste campo deve ser anterior a {0}", invalidText: "{0} n&atilde;o &eacute; uma data v&aacute;lida - deve ser usado o formato {1}", format: "d/m/Y" }); Ext.define("Ext.locale.pt.form.field.ComboBox", { override: "Ext.form.field.ComboBox", valueNotFoundText: undefined }, function() { Ext.apply(Ext.form.field.ComboBox.prototype.defaultListConfig, { loadingText: "Carregando..." }); }); if (exists('Ext.form.field.VTypes')) { Ext.apply(Ext.form.field.VTypes, { emailText: 'Este campo deve ser um endere&ccedil;o de e-mail v&aacute;lido, no formato "utilizador@dominio.com"', urlText: 'Este campo deve ser um URL no formato "http:/' + '/www.dominio.com"', alphaText: 'Este campo deve conter apenas letras e _', alphanumText: 'Este campo deve conter apenas letras, n&uacute;meros e _' }); } Ext.define("Ext.locale.pt.form.field.HtmlEditor", { override: "Ext.form.field.HtmlEditor", createLinkText: 'Por favor, entre com o URL do link:' }, function() { Ext.apply(Ext.form.field.HtmlEditor.prototype, { buttonTips: { bold: { title: 'Negrito (Ctrl+B)', text: 'Deixa o texto seleccionado em negrito.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, italic: { title: 'Italico (Ctrl+I)', text: 'Deixa o texto seleccionado em italico.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, underline: { title: 'Sublinhado (Ctrl+U)', text: 'Sublinha o texto seleccionado.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, increasefontsize: { title: 'Aumentar Texto', text: 'Aumenta o tamanho da fonte.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, decreasefontsize: { title: 'Diminuir Texto', text: 'Diminui o tamanho da fonte.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, backcolor: { title: 'Cor de Fundo', text: 'Muda a cor do fundo do texto seleccionado.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, forecolor: { title: 'Cor da Fonte', text: 'Muda a cor do texto seleccionado.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, justifyleft: { title: 'Alinhar &agrave; Esquerda', text: 'Alinha o texto &agrave; esquerda.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, justifycenter: { title: 'Centrar Texto', text: 'Centra o texto no editor.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, justifyright: { title: 'Alinhar &agrave; Direita', text: 'Alinha o texto &agrave; direita.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, insertunorderedlist: { title: 'Lista com Marcadores', text: 'Inicia uma lista com marcadores.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, insertorderedlist: { title: 'Lista Numerada', text: 'Inicia uma lista numerada.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, createlink: { title: 'Hyperliga&ccedil;&atilde;o', text: 'Transforma o texto selecionado num hyperlink.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, sourceedit: { title: 'Editar Fonte', text: 'Troca para o modo de edi&ccedil;&atilde;o de c&oacute;digo fonte.', cls: Ext.baseCSSPrefix + 'html-editor-tip' } } }); }); Ext.define("Ext.locale.pt.grid.header.Container", { override: "Ext.grid.header.Container", sortAscText: "Ordem Ascendente", sortDescText: "Ordem Descendente", lockText: "Bloquear Coluna", unlockText: "Desbloquear Coluna", columnsText: "Colunas" }); Ext.define("Ext.locale.pt.grid.PropertyColumnModel", { override: "Ext.grid.PropertyColumnModel", nameText: "Nome", valueText: "Valor", dateFormat: "d/m/Y" }); });
JavaScript
/** * Croatian translation * By Ylodi (utf8 encoding) * 8 May 2007 * * By Stjepan at gmail dot com (utf8 encoding) * 17 May 2008 */ Ext.onReady(function() { var cm = Ext.ClassManager, exists = Ext.Function.bind(cm.get, cm); if (Ext.Updater) { Ext.Updater.defaults.indicatorText = '<div class="loading-indicator">Učitavanje...</div>'; } Ext.define("Ext.locale.hr.view.View", { override: "Ext.view.View", emptyText: "" }); Ext.define("Ext.locale.hr.grid.Panel", { override: "Ext.grid.Panel", ddText: "{0} odabranih redova" }); Ext.define("Ext.locale.hr.TabPanelItem", { override: "Ext.TabPanelItem", closeText: "Zatvori ovaj tab" }); Ext.define("Ext.locale.hr.form.field.Base", { override: "Ext.form.field.Base", invalidText: "Unesena vrijednost u ovom polju je neispravna" }); // changing the msg text below will affect the LoadMask Ext.define("Ext.locale.hr.view.AbstractView", { override: "Ext.view.AbstractView", msg: "Učitavanje..." }); if (Ext.Date) { Ext.Date.monthNames = ["Siječanj", "Veljača", "Ožujak", "Travanj", "Svibanj", "Lipanj", "Srpanj", "Kolovoz", "Rujan", "Listopad", "Studeni", "Prosinac"]; Ext.Date.getShortMonthName = function(month) { return Ext.Date.monthNames[month].substring(0, 3); }; Ext.Date.monthNumbers = { Jan: 0, Feb: 1, Mar: 2, Apr: 3, May: 4, Jun: 5, Jul: 6, Aug: 7, Sep: 8, Oct: 9, Nov: 10, Dec: 11 }; Ext.Date.getMonthNumber = function(name) { return Ext.Date.monthNumbers[name.substring(0, 1).toUpperCase() + name.substring(1, 3).toLowerCase()]; }; Ext.Date.dayNames = ["Nedjelja", "Ponedjeljak", "Utorak", "Srijeda", "Četvrtak", "Petak", "Subota"]; Ext.Date.getShortDayName = function(day) { return Ext.Date.dayNames[day].substring(0, 3); }; } if (Ext.MessageBox) { Ext.MessageBox.buttonText = { ok: "U redu", cancel: "Odustani", yes: "Da", no: "Ne" }; } if (exists('Ext.util.Format')) { Ext.apply(Ext.util.Format, { thousandSeparator: '.', decimalSeparator: ',', currencySign: 'kn', // Croation Kuna dateFormat: 'd.m.Y' }); } Ext.define("Ext.locale.hr.picker.Date", { override: "Ext.picker.Date", todayText: "Danas", minText: "Taj datum je prije najmanjeg datuma", maxText: "Taj datum je poslije najvećeg datuma", disabledDaysText: "", disabledDatesText: "", monthNames: Ext.Date.monthNames, dayNames: Ext.Date.dayNames, nextText: 'Slijedeći mjesec (Control+Desno)', prevText: 'Prethodni mjesec (Control+Lijevo)', monthYearText: 'Odaberite mjesec (Control+Gore/Dolje za promjenu godine)', todayTip: "{0} (Razmaknica)", format: "d.m.y", startDay: 1 }); Ext.define("Ext.locale.hr.picker.Month", { override: "Ext.picker.Month", okText: "&#160;U redu&#160;", cancelText: "Odustani" }); Ext.define("Ext.locale.hr.toolbar.Paging", { override: "Ext.PagingToolbar", beforePageText: "Stranica", afterPageText: "od {0}", firstText: "Prva stranica", prevText: "Prethodna stranica", nextText: "Slijedeća stranica", lastText: "Posljednja stranica", refreshText: "Obnovi", displayMsg: "Prikazujem {0} - {1} od {2}", emptyMsg: 'Nema podataka za prikaz' }); Ext.define("Ext.locale.hr.form.field.Text", { override: "Ext.form.field.Text", minLengthText: "Minimalna dužina za ovo polje je {0}", maxLengthText: "Maksimalna dužina za ovo polje je {0}", blankText: "Ovo polje je obavezno", regexText: "", emptyText: null }); Ext.define("Ext.locale.hr.form.field.Number", { override: "Ext.form.field.Number", minText: "Minimalna vrijednost za ovo polje je {0}", maxText: "Maksimalna vrijednost za ovo polje je {0}", nanText: "{0} nije ispravan broj" }); Ext.define("Ext.locale.hr.form.field.Date", { override: "Ext.form.field.Date", disabledDaysText: "Neaktivno", disabledDatesText: "Neaktivno", minText: "Datum u ovom polje mora biti poslije {0}", maxText: "Datum u ovom polju mora biti prije {0}", invalidText: "{0} nije ispravan datum - mora biti u obliku {1}", format: "d.m.y" }); Ext.define("Ext.locale.hr.form.field.ComboBox", { override: "Ext.form.field.ComboBox", valueNotFoundText: undefined }, function() { Ext.apply(Ext.form.field.ComboBox.prototype.defaultListConfig, { loadingText: "Učitavanje..." }); }); if (exists('Ext.form.field.VTypes')) { Ext.apply(Ext.form.field.VTypes, { emailText: 'Ovdje možete unijeti samo e-mail adresu u obliku "korisnik@domena.com"', urlText: 'Ovdje možete unijeti samo URL u obliku "http:/' + '/www.domena.com"', alphaText: 'Ovo polje može sadržavati samo slova i znak _', alphanumText: 'Ovo polje može sadržavati samo slova, brojeve i znak _' }); } Ext.define("Ext.locale.hr.form.field.HtmlEditor", { override: "Ext.form.field.HtmlEditor", createLinkText: 'Unesite URL za link:' }, function() { Ext.apply(Ext.form.field.HtmlEditor.prototype, { buttonTips: { bold: { title: 'Podebljano (Ctrl+B)', text: 'Podebljavanje označenog teksta.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, italic: { title: 'Kurziv (Ctrl+I)', text: 'Pretvaranje označenog tekst u kurziv', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, underline: { title: 'Podcrtano (Ctrl+U)', text: 'Potcrtavanje označenog teksta', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, increasefontsize: { title: 'Povećanje teksta', text: 'Povećavanje veličine fonta.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, decreasefontsize: { title: 'Smanjivanje teksta', text: 'Smanjivanje veličine fonta.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, backcolor: { title: 'Boja označenog teksta', text: 'Promjena boje pozadine označenog teksta.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, forecolor: { title: 'Boja fonta', text: 'Promjena boje označenog teksta.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, justifyleft: { title: 'Lijevo poravnanje teksta', text: 'Poravnanje teksta na lijevu stranu.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, justifycenter: { title: 'Centriranje teksta', text: 'Centriranje teksta u uređivaču teksta.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, justifyright: { title: 'Desno poravnanje teksta', text: 'Poravnanje teksta na desnu stranu.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, insertunorderedlist: { title: 'Označena lista', text: 'Započinjanje označene liste.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, insertorderedlist: { title: 'Numerirana lista', text: 'Započinjanje numerirane liste.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, createlink: { title: 'Hiperveza', text: 'Stvaranje hiperveze od označenog teksta.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, sourceedit: { title: 'Uređivanje izvornog koda', text: 'Prebacivanje u način rada za uređivanje izvornog koda.', cls: Ext.baseCSSPrefix + 'html-editor-tip' } } }); }); Ext.define("Ext.locale.hr.grid.header.Container", { override: "Ext.grid.header.Container", sortAscText: "Sortiraj rastućim redoslijedom", sortDescText: "Sortiraj padajućim redoslijedom", lockText: "Zaključaj stupac", unlockText: "Otključaj stupac", columnsText: "Stupci" }); Ext.define("Ext.locale.hr.grid.GroupingFeature", { override: "Ext.grid.GroupingFeature", emptyGroupText: '(Ništa)', groupByText: 'Grupiranje po ovom polju', showGroupsText: 'Prikaz u grupama' }); Ext.define("Ext.locale.hr.grid.PropertyColumnModel", { override: "Ext.grid.PropertyColumnModel", nameText: "Naziv", valueText: "Vrijednost", dateFormat: "d.m.Y" }); });
JavaScript
/** * Korean Translations By nicetip * 05 September 2007 * Modify by techbug / 25 February 2008 */ Ext.onReady(function() { var cm = Ext.ClassManager, exists = Ext.Function.bind(cm.get, cm); if (Ext.Updater) { Ext.Updater.defaults.indicatorText = '<div class="loading-indicator">로딩중...</div>'; } Ext.define("Ext.locale.ko.view.View", { override: "Ext.view.View", emptyText: "" }); Ext.define("Ext.locale.ko.grid.Panel", { override: "Ext.grid.Panel", ddText: "{0} 개가 선택되었습니다." }); Ext.define("Ext.locale.ko.TabPanelItem", { override: "Ext.TabPanelItem", closeText: "닫기" }); Ext.define("Ext.locale.ko.form.field.Base", { override: "Ext.form.field.Base", invalidText: "올바른 값이 아닙니다." }); // changing the msg text below will affect the LoadMask Ext.define("Ext.locale.ko.view.AbstractView", { override: "Ext.view.AbstractView", msg: "로딩중..." }); if (Ext.Date) { Ext.Date.monthNames = ["1월", "2월", "3월", "4월", "5월", "6월", "7월", "8월", "9월", "10월", "11월", "12월"]; Ext.Date.dayNames = ["일", "월", "화", "수", "목", "금", "토"]; } if (Ext.MessageBox) { Ext.MessageBox.buttonText = { ok: "확인", cancel: "취소", yes: "예", no: "아니오" }; } if (exists('Ext.util.Format')) { Ext.apply(Ext.util.Format, { thousandSeparator: ',', decimalSeparator: '.', currencySign: '\u20a9', // Korean Won dateFormat: 'm/d/Y' }); } Ext.define("Ext.locale.ko.picker.Date", { override: "Ext.picker.Date", todayText: "오늘", minText: "최소 날짜범위를 넘었습니다.", maxText: "최대 날짜범위를 넘었습니다.", disabledDaysText: "", disabledDatesText: "", monthNames: Ext.Date.monthNames, dayNames: Ext.Date.dayNames, nextText: '다음달(컨트롤키+오른쪽 화살표)', prevText: '이전달 (컨트롤키+왼족 화살표)', monthYearText: '월을 선택해주세요. (컨트롤키+위/아래 화살표)', todayTip: "{0} (스페이스바)", format: "m/d/y", startDay: 0 }); Ext.define("Ext.locale.ko.picker.Month", { override: "Ext.picker.Month", okText: "확인", cancelText: "취소" }); Ext.define("Ext.locale.ko.toolbar.Paging", { override: "Ext.PagingToolbar", beforePageText: "페이지", afterPageText: "/ {0}", firstText: "첫 페이지", prevText: "이전 페이지", nextText: "다음 페이지", lastText: "마지막 페이지", refreshText: "새로고침", displayMsg: "전체 {2} 중 {0} - {1}", emptyMsg: '표시할 데이터가 없습니다.' }); Ext.define("Ext.locale.ko.form.field.Text", { override: "Ext.form.field.Text", minLengthText: "최소길이는 {0}입니다.", maxLengthText: "최대길이는 {0}입니다.", blankText: "값을 입력해주세요.", regexText: "", emptyText: null }); Ext.define("Ext.locale.ko.form.field.Number", { override: "Ext.form.field.Number", minText: "최소값은 {0}입니다.", maxText: "최대값은 {0}입니다.", nanText: "{0}는 올바른 숫자가 아닙니다." }); Ext.define("Ext.locale.ko.form.field.Date", { override: "Ext.form.field.Date", disabledDaysText: "비활성", disabledDatesText: "비활성", minText: "{0}일 이후여야 합니다.", maxText: "{0}일 이전이어야 합니다.", invalidText: "{0}는 올바른 날짜형식이 아닙니다. - 다음과 같은 형식이어야 합니다. {1}", format: "m/d/y" }); Ext.define("Ext.locale.ko.form.field.ComboBox", { override: "Ext.form.field.ComboBox", valueNotFoundText: undefined }, function() { Ext.apply(Ext.form.field.ComboBox.prototype.defaultListConfig, { loadingText: "로딩중..." }); }); if (exists('Ext.form.field.VTypes')) { Ext.apply(Ext.form.field.VTypes, { emailText: '이메일 주소 형식에 맞게 입력해야합니다. (예: "user@example.com")', urlText: 'URL 형식에 맞게 입력해야합니다. (예: "http:/' + '/www.example.com")', alphaText: '영문, 밑줄(_)만 입력할 수 있습니다.', alphanumText: '영문, 숫자, 밑줄(_)만 입력할 수 있습니다.' }); } Ext.define("Ext.locale.ko.form.field.HtmlEditor", { override: "Ext.form.field.HtmlEditor", createLinkText: 'URL을 입력해주세요:' }, function() { Ext.apply(Ext.form.field.HtmlEditor.prototype, { buttonTips: { bold: { title: '굵게 (Ctrl+B)', text: '선택한 텍스트를 굵게 표시합니다.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, italic: { title: '기울임꼴 (Ctrl+I)', text: '선택한 텍스트를 기울임꼴로 표시합니다.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, underline: { title: '밑줄 (Ctrl+U)', text: '선택한 텍스트에 밑줄을 표시합니다.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, increasefontsize: { title: '글꼴크기 늘림', text: '글꼴 크기를 크게 합니다.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, decreasefontsize: { title: '글꼴크기 줄임', text: '글꼴 크기를 작게 합니다.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, backcolor: { title: '텍스트 강조 색', text: '선택한 텍스트의 배경색을 변경합니다.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, forecolor: { title: '글꼴색', text: '선택한 텍스트의 색을 변경합니다.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, justifyleft: { title: '텍스트 왼쪽 맞춤', text: '왼쪽에 텍스트를 맞춥니다.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, justifycenter: { title: '가운데 맞춤', text: '가운데에 텍스트를 맞춥니다.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, justifyright: { title: '텍스트 오른쪽 맞춤', text: '오른쪽에 텍스트를 맞춥니다.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, insertunorderedlist: { title: '글머리 기호', text: '글머리 기호 목록을 시작합니다.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, insertorderedlist: { title: '번호 매기기', text: '번호 매기기 목록을 시작합니다.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, createlink: { title: '하이퍼링크', text: '선택한 텍스트에 하이퍼링크를 만듭니다.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, sourceedit: { title: '소스편집', text: '소스편집 모드로 변환합니다.', cls: Ext.baseCSSPrefix + 'html-editor-tip' } } }); }); Ext.define("Ext.locale.ko.grid.header.Container", { override: "Ext.grid.header.Container", sortAscText: "오름차순 정렬", sortDescText: "내림차순 정렬", lockText: "칼럼 잠금", unlockText: "칼럼 잠금해제", columnsText: "칼럼 목록" }); Ext.define("Ext.locale.ko.grid.GroupingFeature", { override: "Ext.grid.GroupingFeature", emptyGroupText: '(None)', groupByText: '현재 필드로 그룹핑합니다.', showGroupsText: '그룹으로 보여주기' }); Ext.define("Ext.locale.ko.grid.PropertyColumnModel", { override: "Ext.grid.PropertyColumnModel", nameText: "항목", valueText: "값", dateFormat: "m/j/Y" }); });
JavaScript
 /** * List compiled by mystix on the extjs.com forums. * Thank you Mystix! * Vietnamese translation * By bpmtri * 12-April-2007 04:06PM */ Ext.onReady(function() { var cm = Ext.ClassManager, exists = Ext.Function.bind(cm.get, cm); if (Ext.Updater) { Ext.Updater.defaults.indicatorText = '<div class="loading-indicator">Đang tải...</div>'; } Ext.define("Ext.locale.vn.view.View", { override: "Ext.view.View", emptyText: "" }); Ext.define("Ext.locale.vn.grid.Panel", { override: "Ext.grid.Panel", ddText: "{0} dòng được chọn" }); Ext.define("Ext.locale.vn.TabPanelItem", { override: "Ext.TabPanelItem", closeText: "Đóng thẻ này" }); Ext.define("Ext.locale.vn.form.field.Base", { override: "Ext.form.field.Base", invalidText: "Giá trị của ô này không hợp lệ." }); // changing the msg text below will affect the LoadMask Ext.define("Ext.locale.vn.view.AbstractView", { override: "Ext.view.AbstractView", msg: "Đang tải..." }); if (Ext.Date) { Ext.Date.monthNames = ["Tháng 1", "Tháng 2", "Tháng 3", "Tháng 4", "Tháng 5", "Tháng 6", "Tháng 7", "Tháng 8", "Tháng 9", "Tháng 10", "Tháng 11", "Tháng 12"]; Ext.Date.dayNames = ["Chủ nhật", "Thứ hai", "Thứ ba", "Thứ tư", "Thứ năm", "Thứ sáu", "Thứ bảy"]; } if (Ext.MessageBox) { Ext.MessageBox.buttonText = { ok: "Đồng ý", cancel: "Hủy bỏ", yes: "Có", no: "Không" }; } if (exists('Ext.util.Format')) { Ext.apply(Ext.util.Format, { thousandSeparator: '.', decimalSeparator: ',', currencySign: '\u20ab', // Vietnamese Dong dateFormat: 'd/m/Y' }); } Ext.define("Ext.locale.vn.picker.Date", { override: "Ext.picker.Date", todayText: "Hôm nay", minText: "Ngày này nhỏ hơn ngày nhỏ nhất", maxText: "Ngày này lớn hơn ngày lớn nhất", disabledDaysText: "", disabledDatesText: "", monthNames: Ext.Date.monthNames, dayNames: Ext.Date.dayNames, nextText: 'Tháng sau (Control+Right)', prevText: 'Tháng trước (Control+Left)', monthYearText: 'Chọn một tháng (Control+Up/Down để thay đổi năm)', todayTip: "{0} (Spacebar - Phím trắng)", format: "d/m/y" }); Ext.define("Ext.locale.vn.toolbar.Paging", { override: "Ext.PagingToolbar", beforePageText: "Trang", afterPageText: "of {0}", firstText: "Trang đầu", prevText: "Trang trước", nextText: "Trang sau", lastText: "Trang cuối", refreshText: "Tải lại", displayMsg: "Hiển thị {0} - {1} của {2}", emptyMsg: 'Không có dữ liệu để hiển thị' }); Ext.define("Ext.locale.vn.form.field.Text", { override: "Ext.form.field.Text", minLengthText: "Chiều dài tối thiểu của ô này là {0}", maxLengthText: "Chiều dài tối đa của ô này là {0}", blankText: "Ô này cần phải nhập giá trị", regexText: "", emptyText: null }); Ext.define("Ext.locale.vn.form.field.Number", { override: "Ext.form.field.Number", minText: "Giá trị nhỏ nhất của ô này là {0}", maxText: "Giá trị lớn nhất của ô này là {0}", nanText: "{0} hông phải là một số hợp lệ" }); Ext.define("Ext.locale.vn.form.field.Date", { override: "Ext.form.field.Date", disabledDaysText: "Vô hiệu", disabledDatesText: "Vô hiệu", minText: "Ngày nhập trong ô này phải sau ngày {0}", maxText: "Ngày nhập trong ô này phải trước ngày {0}", invalidText: "{0} không phải là một ngày hợp lệ - phải có dạng {1}", format: "d/m/y" }); Ext.define("Ext.locale.vn.form.field.ComboBox", { override: "Ext.form.field.ComboBox", valueNotFoundText: undefined }, function() { Ext.apply(Ext.form.field.ComboBox.prototype.defaultListConfig, { loadingText: "Đang tải..." }); }); if (exists('Ext.form.field.VTypes')) { Ext.apply(Ext.form.field.VTypes, { emailText: 'Giá trị của ô này phải là một địa chỉ email có dạng như "ten@abc.com"', urlText: 'Giá trị của ô này phải là một địa chỉ web(URL) hợp lệ, có dạng như "http:/' + '/www.example.com"', alphaText: 'Ô này chỉ được nhập các kí tự và gạch dưới(_)', alphanumText: 'Ô này chỉ được nhập các kí tự, số và gạch dưới(_)' }); } Ext.define("Ext.locale.vn.grid.header.Container", { override: "Ext.grid.header.Container", sortAscText: "Tăng dần", sortDescText: "Giảm dần", lockText: "Khóa cột", unlockText: "Bỏ khóa cột", columnsText: "Các cột" }); Ext.define("Ext.locale.vn.grid.PropertyColumnModel", { override: "Ext.grid.PropertyColumnModel", nameText: "Tên", valueText: "Giá trị", dateFormat: "j/m/Y" }); });
JavaScript
/** * Greek (Old Version) Translations by Vagelis * 03-June-2007 */ Ext.onReady(function() { var cm = Ext.ClassManager, exists = Ext.Function.bind(cm.get, cm); if (Ext.Updater) { Ext.Updater.defaults.indicatorText = '<div class="loading-indicator">Öüñôùóç...</div>'; } Ext.define("Ext.locale.gr.view.View", { override: "Ext.view.View", emptyText: "" }); Ext.define("Ext.locale.gr.grid.Panel", { override: "Ext.grid.Panel", ddText: "{0} åðéëåãìÝíç(åò) ãñáììÞ(Ýò)" }); Ext.define("Ext.locale.gr.TabPanelItem", { override: "Ext.TabPanelItem", closeText: "Êëåßóôå áõôÞ ôçí êáñôÝëá" }); Ext.define("Ext.locale.gr.form.field.Base", { override: "Ext.form.field.Base", invalidText: "Ç ôéìÞ óôï ðåäßï äåí åßíáé Ýãêõñç" }); // changing the msg text below will affect the LoadMask Ext.define("Ext.locale.gr.view.AbstractView", { override: "Ext.view.AbstractView", msg: "Öüñôùóç..." }); if (Ext.Date) { Ext.Date.monthNames = ["ÉáíïõÜñéïò", "ÖåâñïõÜñéïò", "ÌÜñôéïò", "Áðñßëéïò", "ÌÜéïò", "Éïýíéïò", "Éïýëéïò", "Áýãïõóôïò", "ÓåðôÝìâñéïò", "Ïêôþâñéïò", "ÍïÝìâñéïò", "ÄåêÝìâñéïò"]; Ext.Date.dayNames = ["ÊõñéáêÞ", "ÄåõôÝñá", "Ôñßôç", "ÔåôÜñôç", "ÐÝìðôç", "ÐáñáóêåõÞ", "ÓÜââáôï"]; } if (Ext.MessageBox) { Ext.MessageBox.buttonText = { ok: "ÅíôÜîåé", cancel: "Áêýñùóç", yes: "Íáé", no: "¼÷é" }; } if (exists('Ext.util.Format')) { Ext.apply(Ext.util.Format, { thousandSeparator: '.', decimalSeparator: ',', currencySign: '\u20ac', // Greek Euro dateFormat: 'ì/ç/Å' }); } Ext.define("Ext.locale.gr.picker.Date", { override: "Ext.picker.Date", todayText: "ÓÞìåñá", minText: "Ç çìåñïìçíßá áõôÞ åßíáé ðñéí ôçí ìéêñüôåñç çìåñïìçíßá", maxText: "Ç çìåñïìçíßá áõôÞ åßíáé ìåôÜ ôçí ìåãáëýôåñç çìåñïìçíßá", disabledDaysText: "", disabledDatesText: "", monthNames: Ext.Date.monthNames, dayNames: Ext.Date.dayNames, nextText: 'Åðüìåíïò ÌÞíáò (Control+Right)', prevText: 'Ðñïçãïýìåíïò ÌÞíáò (Control+Left)', monthYearText: 'ÅðéëÝîôå ÌÞíá (Control+Up/Down ãéá ìåôáêßíçóç óôá Ýôç)', todayTip: "{0} (Spacebar)", format: "ì/ç/Å" }); Ext.define("Ext.locale.gr.toolbar.Paging", { override: "Ext.PagingToolbar", beforePageText: "Óåëßäá", afterPageText: "áðü {0}", firstText: "Ðñþôç óåëßäá", prevText: "Ðñïçãïýìåíç óåëßäá", nextText: "Åðüìåíç óåëßäá", lastText: "Ôåëåõôáßá óåëßäá", refreshText: "ÁíáíÝùóç", displayMsg: "ÅìöÜíéóç {0} - {1} áðü {2}", emptyMsg: 'Äåí âñÝèçêáí åããñáöÝò ãéá åìöÜíéóç' }); Ext.define("Ext.locale.gr.form.field.Text", { override: "Ext.form.field.Text", minLengthText: "Ôï åëÜ÷éóôï ìÝãåèïò ãéá áõôü ôï ðåäßï åßíáé {0}", maxLengthText: "Ôï ìÝãéóôï ìÝãåèïò ãéá áõôü ôï ðåäßï åßíáé {0}", blankText: "Ôï ðåäßï áõôü åßíáé õðï÷ñåùôïêü", regexText: "", emptyText: null }); Ext.define("Ext.locale.gr.form.field.Number", { override: "Ext.form.field.Number", minText: "Ç åëÜ÷éóôç ôéìÞ ãéá áõôü ôï ðåäßï åßíáé {0}", maxText: "Ç ìÝãéóôç ôéìÞ ãéá áõôü ôï ðåäßï åßíáé {0}", nanText: "{0} äåí åßíáé Ýãêõñïò áñéèìüò" }); Ext.define("Ext.locale.gr.form.field.Date", { override: "Ext.form.field.Date", disabledDaysText: "ÁðåíåñãïðïéçìÝíï", disabledDatesText: "ÁðåíåñãïðïéçìÝíï", minText: "Ç çìåñïìçíßá ó' áõôü ôï ðåäßï ðñÝðåé íá åßíáé ìåôÜ áðü {0}", maxText: "Ç çìåñïìçíßá ó' áõôü ôï ðåäßï ðñÝðåé íá åßíáé ðñéí áðü {0}", invalidText: "{0} äåí åßíáé Ýãêõñç çìåñïìçíßá - ðñÝðåé íá åßíáé ôçò ìïñöÞò {1}", format: "ì/ç/Å" }); Ext.define("Ext.locale.gr.form.field.ComboBox", { override: "Ext.form.field.ComboBox", valueNotFoundText: undefined }, function() { Ext.apply(Ext.form.field.ComboBox.prototype.defaultListConfig, { loadingText: "Öüñôùóç..." }); }); if (exists('Ext.form.field.VTypes')) { Ext.apply(Ext.form.field.VTypes, { emailText: 'Áõôü ôï ðåäßï ðñÝðåé íá åßíáé e-mail address ôçò ìïñöÞò "user@example.com"', urlText: 'Áõôü ôï ðåäßï ðñÝðåé íá åßíáé ìéá äéåýèõíóç URL ôçò ìïñöÞò "http:/' + '/www.example.com"', alphaText: 'Áõôü ôï ðåäßï ðñÝðåé íá ðåñéÝ÷åé ãñÜììáôá êáé _', alphanumText: 'Áõôü ôï ðåäßï ðñÝðåé íá ðåñéÝ÷åé ãñÜììáôá, áñéèìïýò êáé _' }); } Ext.define("Ext.locale.gr.grid.header.Container", { override: "Ext.grid.header.Container", sortAscText: "Áýîïõóá Ôáîéíüìçóç", sortDescText: "Öèßíïõóá Ôáîéíüìçóç", lockText: "Êëåßäùìá óôÞëçò", unlockText: "Îåêëåßäùìá óôÞëçò", columnsText: "ÓôÞëåò" }); Ext.define("Ext.locale.gr.grid.PropertyColumnModel", { override: "Ext.grid.PropertyColumnModel", nameText: "¼íïìá", valueText: "ÔéìÞ", dateFormat: "ì/ç/Å" }); });
JavaScript
/** * List compiled by mystix on the extjs.com forums. * Thank you Mystix! * Slovak Translation by Michal Thomka * 14 April 2007 */ Ext.onReady(function() { var cm = Ext.ClassManager, exists = Ext.Function.bind(cm.get, cm); if (Ext.Updater) { Ext.Updater.defaults.indicatorText = '<div class="loading-indicator">Nahrávam...</div>'; } Ext.define("Ext.locale.sk.view.View", { override: "Ext.view.View", emptyText: "" }); Ext.define("Ext.locale.sk.grid.Panel", { override: "Ext.grid.Panel", ddText: "{0} označených riadkov" }); Ext.define("Ext.locale.sk.TabPanelItem", { override: "Ext.TabPanelItem", closeText: "Zavrieť túto záložku" }); Ext.define("Ext.locale.sk.form.field.Base", { override: "Ext.form.field.Base", invalidText: "Hodnota v tomto poli je nesprávna" }); // changing the msg text below will affect the LoadMask Ext.define("Ext.locale.sk.view.AbstractView", { override: "Ext.view.AbstractView", msg: "Nahrávam..." }); if (Ext.Date) { Ext.Date.monthNames = ["Január", "Február", "Marec", "Apríl", "Máj", "Jún", "Júl", "August", "September", "Október", "November", "December"]; Ext.Date.dayNames = ["Nedeľa", "Pondelok", "Utorok", "Streda", "Štvrtok", "Piatok", "Sobota"]; } if (Ext.MessageBox) { Ext.MessageBox.buttonText = { ok: "OK", cancel: "Zrušiť", yes: "Áno", no: "Nie" }; } if (exists('Ext.util.Format')) { Ext.apply(Ext.util.Format, { thousandSeparator: '.', decimalSeparator: ',', currencySign: '\u20ac', // Slovakian Euro dateFormat: 'd.m.Y' }); } Ext.define("Ext.locale.sk.picker.Date", { override: "Ext.picker.Date", todayText: "Dnes", minText: "Tento dátum je menší ako minimálny možný dátum", maxText: "Tento dátum je väčší ako maximálny možný dátum", disabledDaysText: "", disabledDatesText: "", monthNames: Ext.Date.monthNames, dayNames: Ext.Date.dayNames, nextText: 'Ďalší Mesiac (Control+Doprava)', prevText: 'Predch. Mesiac (Control+Doľava)', monthYearText: 'Vyberte Mesiac (Control+Hore/Dole pre posun rokov)', todayTip: "{0} (Medzerník)", format: "d.m.Y" }); Ext.define("Ext.locale.sk.toolbar.Paging", { override: "Ext.PagingToolbar", beforePageText: "Strana", afterPageText: "z {0}", firstText: "Prvá Strana", prevText: "Predch. Strana", nextText: "Ďalšia Strana", lastText: "Posledná strana", refreshText: "Obnoviť", displayMsg: "Zobrazujem {0} - {1} z {2}", emptyMsg: 'Žiadne dáta' }); Ext.define("Ext.locale.sk.form.field.Text", { override: "Ext.form.field.Text", minLengthText: "Minimálna dĺžka pre toto pole je {0}", maxLengthText: "Maximálna dĺžka pre toto pole je {0}", blankText: "Toto pole je povinné", regexText: "", emptyText: null }); Ext.define("Ext.locale.sk.form.field.Number", { override: "Ext.form.field.Number", minText: "Minimálna hodnota pre toto pole je {0}", maxText: "Maximálna hodnota pre toto pole je {0}", nanText: "{0} je nesprávne číslo" }); Ext.define("Ext.locale.sk.form.field.Date", { override: "Ext.form.field.Date", disabledDaysText: "Zablokované", disabledDatesText: "Zablokované", minText: "Dátum v tomto poli musí byť až po {0}", maxText: "Dátum v tomto poli musí byť pred {0}", invalidText: "{0} nie je správny dátum - musí byť vo formáte {1}", format: "d.m.Y" }); Ext.define("Ext.locale.sk.form.field.ComboBox", { override: "Ext.form.field.ComboBox", valueNotFoundText: undefined }, function() { Ext.apply(Ext.form.field.ComboBox.prototype.defaultListConfig, { loadingText: "Nahrávam..." }); }); if (exists('Ext.form.field.VTypes')) { Ext.apply(Ext.form.field.VTypes, { emailText: 'Toto pole musí byť e-mailová adresa vo formáte "user@example.com"', urlText: 'Toto pole musí byť URL vo formáte "http:/' + '/www.example.com"', alphaText: 'Toto pole može obsahovať iba písmená a znak _', alphanumText: 'Toto pole može obsahovať iba písmená, čísla a znak _' }); } Ext.define("Ext.locale.sk.grid.header.Container", { override: "Ext.grid.header.Container", sortAscText: "Zoradiť vzostupne", sortDescText: "Zoradiť zostupne", lockText: "Zamknúť stľpec", unlockText: "Odomknúť stľpec", columnsText: "Stľpce" }); Ext.define("Ext.locale.sk.grid.PropertyColumnModel", { override: "Ext.grid.PropertyColumnModel", nameText: "Názov", valueText: "Hodnota", dateFormat: "d.m.Y" }); });
JavaScript
/** * Macedonia translation * By PetarD petar.dimitrijevic@vorteksed.com.mk (utf8 encoding) * 23 April 2007 */ Ext.onReady(function() { var cm = Ext.ClassManager, exists = Ext.Function.bind(cm.get, cm); if (Ext.Updater) { Ext.Updater.defaults.indicatorText = '<div class="loading-indicator">Вчитувам...</div>'; } Ext.define("Ext.locale.mk.view.View", { override: "Ext.view.View", emptyText: "" }); Ext.define("Ext.locale.mk.grid.Panel", { override: "Ext.grid.Panel", ddText: "{0} избрани редици" }); Ext.define("Ext.locale.mk.TabPanelItem", { override: "Ext.TabPanelItem", closeText: "Затвори tab" }); Ext.define("Ext.locale.mk.form.field.Base", { override: "Ext.form.field.Base", invalidText: "Вредноста во ова поле е невалидна" }); // changing the msg text below will affect the LoadMask Ext.define("Ext.locale.mk.view.AbstractView", { override: "Ext.view.AbstractView", msg: "Вчитувам..." }); if (Ext.Date) { Ext.Date.monthNames = ["Јануари", "Февруари", "Март", "Април", "Мај", "Јуни", "Јули", "Август", "Септември", "Октомври", "Ноември", "Декември"]; Ext.Date.dayNames = ["Недела", "Понеделник", "Вторник", "Среда", "Четврток", "Петок", "Сабота"]; } if (Ext.MessageBox) { Ext.MessageBox.buttonText = { ok: "Потврди", cancel: "Поништи", yes: "Да", no: "Не" }; } if (exists('Ext.util.Format')) { Ext.apply(Ext.util.Format, { thousandSeparator: '.', decimalSeparator: ',', currencySign: '\u0434\u0435\u043d', // Macedonian Denar dateFormat: 'd.m.Y' }); } Ext.define("Ext.locale.mk.picker.Date", { override: "Ext.picker.Date", todayText: "Денеска", minText: "Овој датум е пред најмалиот датум", maxText: "Овој датум е пред најголемиот датум", disabledDaysText: "", disabledDatesText: "", monthNames: Ext.Date.monthNames, dayNames: Ext.Date.dayNames, nextText: 'Следен месец (Control+Стрелка десно)', prevText: 'Претходен месец (Control+Стрелка лево)', monthYearText: 'Изберете месец (Control+Стрелка горе/Стрелка десно за менување година)', todayTip: "{0} (Spacebar)", format: "d.m.y" }); Ext.define("Ext.locale.mk.toolbar.Paging", { override: "Ext.PagingToolbar", beforePageText: "Страница", afterPageText: "од {0}", firstText: "Прва Страница", prevText: "Претходна Страница", nextText: "Следна Страница", lastText: "Последна Страница", refreshText: "Освежи", displayMsg: "Прикажувам {0} - {1} од {2}", emptyMsg: 'Нема податоци за приказ' }); Ext.define("Ext.locale.mk.form.field.Text", { override: "Ext.form.field.Text", minLengthText: "Минималната должина за ова поле е {0}", maxLengthText: "Максималната должина за ова поле е {0}", blankText: "Податоците во ова поле се потребни", regexText: "", emptyText: null }); Ext.define("Ext.locale.mk.form.field.Number", { override: "Ext.form.field.Number", minText: "Минималната вредност за ова поле е {0}", maxText: "Максималната вредност за ова поле е {0}", nanText: "{0} не е валиден број" }); Ext.define("Ext.locale.mk.form.field.Date", { override: "Ext.form.field.Date", disabledDaysText: "Неактивно", disabledDatesText: "Неактивно", minText: "Датумот во ова поле мора да биде пред {0}", maxText: "Датумот во ова поле мора да биде по {0}", invalidText: "{0} не е валиден датум - мора да биде во формат {1}", format: "d.m.y" }); Ext.define("Ext.locale.mk.form.field.ComboBox", { override: "Ext.form.field.ComboBox", valueNotFoundText: undefined }, function() { Ext.apply(Ext.form.field.ComboBox.prototype.defaultListConfig, { loadingText: "Вчитувам..." }); }); if (exists('Ext.form.field.VTypes')) { Ext.apply(Ext.form.field.VTypes, { emailText: 'Ова поле треба да биде e-mail адреса во формат "user@example.com"', urlText: 'Ова поле треба да биде URL во формат "http:/' + '/www.example.com"', alphaText: 'Ова поле треба да содржи само букви и _', alphanumText: 'Ова поле треба да содржи само букви, бројки и _' }); } Ext.define("Ext.locale.mk.grid.header.Container", { override: "Ext.grid.header.Container", sortAscText: "Сортирај Растечки", sortDescText: "Сортирај Опаѓачки", lockText: "Заклучи Колона", unlockText: "Отклучи колона", columnsText: "Колони" }); Ext.define("Ext.locale.mk.grid.PropertyColumnModel", { override: "Ext.grid.PropertyColumnModel", nameText: "Име", valueText: "Вредност", dateFormat: "m.d.Y" }); });
JavaScript
/** * Catalonian Translation by halkon_polako 6-12-2007 * December correction halkon_polako 11-12-2007 * * Synchronized with 2.2 version of ext-lang-en.js (provided by Condor 8 aug 2008) * by halkon_polako 14-aug-2008 */ Ext.onReady(function() { var cm = Ext.ClassManager, exists = Ext.Function.bind(cm.get, cm); if (Ext.Updater) { Ext.Updater.defaults.indicatorText = '<div class="loading-indicator">Carregant...</div>'; } Ext.define("Ext.locale.ca.view.View", { override: "Ext.view.View", emptyText: "" }); Ext.define("Ext.locale.ca.grid.Panel", { override: "Ext.grid.Panel", ddText: "{0} fila(es) seleccionada(es)" }); // changing the msg text below will affect the LoadMask Ext.define("Ext.locale.ca.view.AbstractView", { override: "Ext.view.AbstractView", msg: "Carregant..." }); if (Ext.Date) { Ext.Date.monthNames = ["Gener", "Febrer", "Mar&#231;", "Abril", "Maig", "Juny", "Juliol", "Agost", "Setembre", "Octubre", "Novembre", "Desembre"]; Ext.Date.getShortMonthName = function(month) { return Ext.Date.monthNames[month].substring(0, 3); }; Ext.Date.monthNumbers = { Gen: 0, Feb: 1, Mar: 2, Abr: 3, Mai: 4, Jun: 5, Jul: 6, Ago: 7, Set: 8, Oct: 9, Nov: 10, Dec: 11 }; Ext.Date.getMonthNumber = function(name) { return Ext.Date.monthNumbers[name.substring(0, 1).toUpperCase() + name.substring(1, 3).toLowerCase()]; }; Ext.Date.dayNames = ["Diumenge", "Dilluns", "Dimarts", "Dimecres", "Dijous", "Divendres", "Dissabte"]; Ext.Date.getShortDayName = function(day) { return Ext.Date.dayNames[day].substring(0, 3); }; Ext.Date.parseCodes.S.s = "(?:st|nd|rd|th)"; } if (Ext.MessageBox) { Ext.MessageBox.buttonText = { ok: "Acceptar", cancel: "Cancel&#183;lar", yes: "S&#237;", no: "No" }; } if (exists('Ext.util.Format')) { Ext.apply(Ext.util.Format, { thousandSeparator: '.', decimalSeparator: ',', currencySign: '\u20ac', // Spanish Euro dateFormat: 'd/m/Y' }); } Ext.define("Ext.locale.ca.picker.Date", { override: "Ext.picker.Date", todayText: "Avui", minText: "Aquesta data &#233;s anterior a la data m&#237;nima", maxText: "Aquesta data &#233;s posterior a la data m&#224;xima", disabledDaysText: "", disabledDatesText: "", monthNames: Ext.Date.monthNames, dayNames: Ext.Date.dayNames, nextText: 'Mes Seg&#252;ent (Control+Fletxa Dreta)', prevText: 'Mes Anterior (Control+Fletxa Esquerra)', monthYearText: 'Seleccioni un mes (Control+Fletxa a Dalt o Abaix per canviar els anys)', todayTip: "{0} (Barra d&#39;espai)", format: "d/m/Y", startDay: 1 }); Ext.define("Ext.locale.ca.picker.Month", { override: "Ext.picker.Month", okText: "&#160;Acceptar&#160;", cancelText: "Cancel&#183;lar" }); Ext.define("Ext.locale.ca.toolbar.Paging", { override: "Ext.PagingToolbar", beforePageText: "P&#224;gina", afterPageText: "de {0}", firstText: "Primera P&#224;gina", prevText: "P&#224;gina Anterior", nextText: "P&#224;gina Seg&#252;ent", lastText: "Darrera P&#224;gina", refreshText: "Refrescar", displayMsg: "Mostrant {0} - {1} de {2}", emptyMsg: 'Sense dades per mostrar' }); Ext.define("Ext.locale.ca.form.field.Base", { override: "Ext.form.field.Base", invalidText: "El valor d&#39;aquest camp &#233;s inv&#224;lid" }); Ext.define("Ext.locale.ca.form.field.Text", { override: "Ext.form.field.Text", minLengthText: "El tamany m&#237;nim per aquest camp &#233;s {0}", maxLengthText: "El tamany m&#224;xim per aquest camp &#233;s {0}", blankText: "Aquest camp &#233;s obligatori", regexText: "", emptyText: null }); Ext.define("Ext.locale.ca.form.field.Number", { override: "Ext.form.field.Number", decimalSeparator: ",", decimalPrecision: 2, minText: "El valor m&#237;nim per aquest camp &#233;s {0}", maxText: "El valor m&#224;xim per aquest camp &#233;s {0}", nanText: "{0} no &#233;s un nombre v&#224;lid" }); Ext.define("Ext.locale.ca.form.field.Date", { override: "Ext.form.field.Date", disabledDaysText: "Deshabilitat", disabledDatesText: "Deshabilitat", minText: "La data en aquest camp ha de ser posterior a {0}", maxText: "La data en aquest camp ha de ser inferior a {0}", invalidText: "{0} no &#233;s una data v&#224;lida - ha de tenir el format {1}", format: "d/m/Y", altFormats: "d/m/Y|d-m-y|d-m-Y|d/m|d-m|dm|dmy|dmY|d|Y-m-d" }); Ext.define("Ext.locale.ca.form.field.ComboBox", { override: "Ext.form.field.ComboBox", valueNotFoundText: undefined }, function() { Ext.apply(Ext.form.field.ComboBox.prototype.defaultListConfig, { loadingText: "Carregant..." }); }); if (exists('Ext.form.field.VTypes')) { Ext.apply(Ext.form.field.VTypes, { emailText: 'Aquest camp ha de ser una adre&#231;a de e-mail amb el format "user@example.com"', urlText: 'Aquest camp ha de ser una URL amb el format "http:/' + '/www.example.com"', alphaText: 'Aquest camp nom&#233;s pot contenir lletres i _', alphanumText: 'Aquest camp nom&#233;s por contenir lletres, nombres i _' }); } Ext.define("Ext.locale.ca.form.field.HtmlEditor", { override: "Ext.form.field.HtmlEditor", createLinkText: 'Si us plau, tecleixi la URL per l\'enlla&#231;:' }, function() { Ext.apply(Ext.form.field.HtmlEditor.prototype, { buttonTips: { bold: { title: 'Negreta (Ctrl+B)', text: 'Posa el text seleccionat en negreta.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, italic: { title: 'It&#224;lica (Ctrl+I)', text: 'Posa el text seleccionat en it&#224;lica.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, underline: { title: 'Subratllat (Ctrl+U)', text: 'Subratlla el text seleccionat.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, increasefontsize: { title: 'Augmentar Text', text: 'Augmenta el tamany de la font de text.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, decreasefontsize: { title: 'Disminuir Text', text: 'Disminueix el tamany de la font de text.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, backcolor: { title: 'Color de fons', text: 'Canvia el color de fons del text seleccionat.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, forecolor: { title: 'Color de la font de text', text: 'Canvia el color del text seleccionat.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, justifyleft: { title: 'Alinear a la esquerra', text: 'Alinea el text a la esquerra.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, justifycenter: { title: 'Centrar el text', text: 'Centra el text a l\'editor', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, justifyright: { title: 'Alinear a la dreta', text: 'Alinea el text a la dreta.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, insertunorderedlist: { title: 'Llista amb vinyetes', text: 'Comen&#231;a una llista amb vinyetes.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, insertorderedlist: { title: 'Llista numerada', text: 'Comen&#231;a una llista numerada.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, createlink: { title: 'Enlla&#231;', text: 'Transforma el text seleccionat en un enlla&#231;.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, sourceedit: { title: 'Editar Codi', text: 'Canvia al mode d\'edici&#243; de codi.', cls: Ext.baseCSSPrefix + 'html-editor-tip' } } }); }); Ext.define("Ext.locale.ca.grid.header.Container", { override: "Ext.grid.header.Container", sortAscText: "Ordenaci&#243; Ascendent", sortDescText: "Ordenaci&#243; Descendent", columnsText: "Columnes" }); Ext.define("Ext.locale.ca.grid.GroupingFeature", { override: "Ext.grid.GroupingFeature", emptyGroupText: '(Buit)', groupByText: 'Agrupar Per Aquest Camp', showGroupsText: 'Mostrar en Grups' }); Ext.define("Ext.locale.ca.grid.PropertyColumnModel", { override: "Ext.grid.PropertyColumnModel", nameText: "Nom", valueText: "Valor", dateFormat: "d/m/Y" }); Ext.define("Ext.locale.ca.form.field.Time", { override: "Ext.form.field.Time", minText: "L\'hora en aquest camp ha de ser igual o posterior a {0}", maxText: "L\'hora en aquest camp ha de ser igual o anterior {0}", invalidText: "{0} no &#233;s un hora v&#224;lida", format: "g:i A", altFormats: "g:ia|g:iA|g:i a|g:i A|h:i|g:i|H:i|ga|ha|gA|h a|g a|g A|gi|hi|gia|hia|g|H" }); Ext.define("Ext.locale.ca.form.CheckboxGroup", { override: "Ext.form.CheckboxGroup", blankText: "Ha de seleccionar almenys un &#233;tem d\'aquest group" }); Ext.define("Ext.locale.ca.form.RadioGroup", { override: "Ext.form.RadioGroup", blankText: "Ha de seleccionar un &#233;tem d\'aquest grup" }); });
JavaScript
/** * Latvian Translations * By salix 17 April 2007 */ Ext.onReady(function() { var cm = Ext.ClassManager, exists = Ext.Function.bind(cm.get, cm); if (Ext.Updater) { Ext.Updater.defaults.indicatorText = '<div class="loading-indicator">Notiek ielāde...</div>'; } Ext.define("Ext.locale.lv.view.View", { override: "Ext.view.View", emptyText: "" }); Ext.define("Ext.locale.lv.grid.Panel", { override: "Ext.grid.Panel", ddText: "{0} iezīmētu rindu" }); Ext.define("Ext.locale.lv.TabPanelItem", { override: "Ext.TabPanelItem", closeText: "Aizver šo zīmni" }); Ext.define("Ext.locale.lv.form.field.Base", { override: "Ext.form.field.Base", invalidText: "Vērtība šajā laukā nav pareiza" }); // changing the msg text below will affect the LoadMask Ext.define("Ext.locale.lv.view.AbstractView", { override: "Ext.view.AbstractView", msg: "Ielādē..." }); if (Ext.Date) { Ext.Date.monthNames = ["Janvāris", "Februāris", "Marts", "Aprīlis", "Maijs", "Jūnijs", "Jūlijs", "Augusts", "Septembris", "Oktobris", "Novembris", "Decembris"]; Ext.Date.dayNames = ["Svētdiena", "Pirmdiena", "Otrdiena", "Trešdiena", "Ceturtdiena", "Piektdiena", "Sestdiena"]; } if (Ext.MessageBox) { Ext.MessageBox.buttonText = { ok: "Labi", cancel: "Atcelt", yes: "Jā", no: "Nē" }; } if (exists('Ext.util.Format')) { Ext.apply(Ext.util.Format, { thousandSeparator: '.', decimalSeparator: ',', currencySign: 'Ls', // Latvian Lati dateFormat: 'd.m.Y' }); } Ext.define("Ext.locale.lv.picker.Date", { override: "Ext.picker.Date", todayText: "Šodiena", minText: "Norādītais datums ir mazāks par minimālo datumu", maxText: "Norādītais datums ir lielāks par maksimālo datumu", disabledDaysText: "", disabledDatesText: "", monthNames: Ext.Date.monthNames, dayNames: Ext.Date.dayNames, nextText: 'Nākamais mēnesis (Control+pa labi)', prevText: 'Iepriekšējais mēnesis (Control+pa kreisi)', monthYearText: 'Mēneša izvēle (Control+uz augšu/uz leju lai pārslēgtu gadus)', todayTip: "{0} (Tukšumzīme)", format: "d.m.Y", startDay: 1 }); Ext.define("Ext.locale.lv.toolbar.Paging", { override: "Ext.PagingToolbar", beforePageText: "Lapa", afterPageText: "no {0}", firstText: "Pirmā lapa", prevText: "iepriekšējā lapa", nextText: "Nākamā lapa", lastText: "Pēdējā lapa", refreshText: "Atsvaidzināt", displayMsg: "Rāda no {0} līdz {1} ierakstiem, kopā {2}", emptyMsg: 'Nav datu, ko parādīt' }); Ext.define("Ext.locale.lv.form.field.Text", { override: "Ext.form.field.Text", minLengthText: "Minimālais garums šim laukam ir {0}", maxLengthText: "Maksimālais garums šim laukam ir {0}", blankText: "Šis ir obligāts lauks", regexText: "", emptyText: null }); Ext.define("Ext.locale.lv.form.field.Number", { override: "Ext.form.field.Number", minText: "Minimālais garums šim laukam ir {0}", maxText: "Maksimālais garums šim laukam ir {0}", nanText: "{0} nav pareizs skaitlis" }); Ext.define("Ext.locale.lv.form.field.Date", { override: "Ext.form.field.Date", disabledDaysText: "Atspējots", disabledDatesText: "Atspējots", minText: "Datumam šajā laukā jābūt lielākam kā {0}", maxText: "Datumam šajā laukā jābūt mazākam kā {0}", invalidText: "{0} nav pareizs datums - tam jābūt šādā formātā: {1}", format: "d.m.Y" }); Ext.define("Ext.locale.lv.form.field.ComboBox", { override: "Ext.form.field.ComboBox", valueNotFoundText: undefined }, function() { Ext.apply(Ext.form.field.ComboBox.prototype.defaultListConfig, { loadingText: "Ielādē..." }); }); if (exists('Ext.form.field.VTypes')) { Ext.apply(Ext.form.field.VTypes, { emailText: 'Šajā laukā jāieraksta e-pasta adrese formātā "lietotās@domēns.lv"', urlText: 'Šajā laukā jāieraksta URL formātā "http:/' + '/www.domēns.lv"', alphaText: 'Šis lauks drīkst saturēt tikai burtus un _ zīmi', alphanumText: 'Šis lauks drīkst saturēt tikai burtus, ciparus un _ zīmi' }); } Ext.define("Ext.locale.lv.grid.header.Container", { override: "Ext.grid.header.Container", sortAscText: "Kārtot pieaugošā secībā", sortDescText: "Kārtot dilstošā secībā", lockText: "Noslēgt kolonnu", unlockText: "Atslēgt kolonnu", columnsText: "Kolonnas" }); Ext.define("Ext.locale.lv.grid.PropertyColumnModel", { override: "Ext.grid.PropertyColumnModel", nameText: "Nosaukums", valueText: "Vērtība", dateFormat: "j.m.Y" }); });
JavaScript
/** * Finnish Translations * <tuomas.salo (at) iki.fi> * 'ä' should read as lowercase 'a' with two dots on top (&auml;) */ Ext.onReady(function() { var cm = Ext.ClassManager, exists = Ext.Function.bind(cm.get, cm); if (Ext.Updater) { Ext.Updater.defaults.indicatorText = '<div class="loading-indicator">Ladataan...</div>'; } Ext.define("Ext.locale.fi.view.View", { override: "Ext.view.View", emptyText: "" }); Ext.define("Ext.locale.fi.grid.Panel", { override: "Ext.grid.Panel", ddText: "{0} rivi(ä) valittu" }); Ext.define("Ext.locale.fi.TabPanelItem", { override: "Ext.TabPanelItem", closeText: "Sulje tämä välilehti" }); // changing the msg text below will affect the LoadMask Ext.define("Ext.locale.fi.view.AbstractView", { override: "Ext.view.AbstractView", msg: "Ladataan..." }); if (Ext.Date) { Ext.Date.monthNames = ["tammikuu", "helmikuu", "maaliskuu", "huhtikuu", "toukokuu", "kesäkuu", "heinäkuu", "elokuu", "syyskuu", "lokakuu", "marraskuu", "joulukuu"]; Ext.Date.getShortMonthName = function(month) { //return Ext.Date.monthNames[month].substring(0, 3); return (month + 1) + "."; }; Ext.Date.monthNumbers = { Jan: 0, Feb: 1, Mar: 2, Apr: 3, May: 4, Jun: 5, Jul: 6, Aug: 7, Sep: 8, Oct: 9, Nov: 10, Dec: 11 }; Ext.Date.getMonthNumber = function(name) { if (name.match(/^(1?\d)\./)) { return -1 + RegExp.$1; } else { return Ext.Date.monthNumbers[name.substring(0, 1).toUpperCase() + name.substring(1, 3).toLowerCase()]; } }; Ext.Date.dayNames = ["sunnuntai", "maanantai", "tiistai", "keskiviikko", "torstai", "perjantai", "lauantai"]; Ext.Date.getShortDayName = function(day) { return Ext.Date.dayNames[day].substring(0, 2); }; } if (Ext.MessageBox) { Ext.MessageBox.buttonText = { ok: "OK", cancel: "Peruuta", yes: "Kyllä", no: "Ei" }; } if (exists('Ext.util.Format')) { Ext.apply(Ext.util.Format, { thousandSeparator: '.', decimalSeparator: ',', currencySign: '\u20ac', // Finnish Euro dateFormat: 'j.n.Y' }); } if (exists('Ext.util.Format')) { Ext.util.Format.date = function(v, format) { if (!v) return ""; if (!(v instanceof Date)) v = new Date(Date.parse(v)); return Ext.Date.format(v, format || "j.n.Y"); }; } Ext.define("Ext.locale.fi.picker.Date", { override: "Ext.picker.Date", todayText: "Tänään", minText: "Tämä päivämäärä on aikaisempi kuin ensimmäinen sallittu", maxText: "Tämä päivämäärä on myöhäisempi kuin viimeinen sallittu", disabledDaysText: "", disabledDatesText: "", monthNames: Ext.Date.monthNames, dayNames: Ext.Date.dayNames, nextText: 'Seuraava kuukausi (Control+oikealle)', prevText: 'Edellinen kuukausi (Control+vasemmalle)', monthYearText: 'Valitse kuukausi (vaihda vuotta painamalla Control+ylös/alas)', todayTip: "{0} (välilyönti)", format: "j.n.Y", startDay: 1 // viikko alkaa maanantaista }); Ext.define("Ext.locale.fi.picker.Month", { override: "Ext.picker.Month", okText: "&#160;OK&#160;", cancelText: "Peruuta" }); Ext.define("Ext.locale.fi.toolbar.Paging", { override: "Ext.PagingToolbar", beforePageText: "Sivu", afterPageText: "/ {0}", firstText: "Ensimmäinen sivu", prevText: "Edellinen sivu", nextText: "Seuraava sivu", lastText: "Viimeinen sivu", refreshText: "Päivitä", displayMsg: "Näytetään {0} - {1} / {2}", emptyMsg: 'Ei tietoja' }); Ext.define("Ext.locale.fi.form.field.Base", { override: "Ext.form.field.Base", invalidText: "Tämän kentän arvo ei kelpaa" }); Ext.define("Ext.locale.fi.form.field.Text", { override: "Ext.form.field.Text", minLengthText: "Tämän kentän minimipituus on {0}", maxLengthText: "Tämän kentän maksimipituus on {0}", blankText: "Tämä kenttä on pakollinen", regexText: "", emptyText: null }); Ext.define("Ext.locale.fi.form.field.Number", { override: "Ext.form.field.Number", minText: "Tämän kentän pienin sallittu arvo on {0}", maxText: "Tämän kentän suurin sallittu arvo on {0}", nanText: "{0} ei ole numero" }); Ext.define("Ext.locale.fi.form.field.Date", { override: "Ext.form.field.Date", disabledDaysText: "Ei käytössä", disabledDatesText: "Ei käytössä", minText: "Tämän kentän päivämäärän tulee olla {0} jälkeen", maxText: "Tämän kentän päivämäärän tulee olla ennen {0}", invalidText: "Päivämäärä {0} ei ole oikeassa muodossa - kirjoita päivämäärä muodossa {1}", format: "j.n.Y", altFormats: "j.n.|d.m.|mdy|mdY|d|Y-m-d|Y/m/d" }); Ext.define("Ext.locale.fi.form.field.ComboBox", { override: "Ext.form.field.ComboBox", valueNotFoundText: undefined }, function() { Ext.apply(Ext.form.field.ComboBox.prototype.defaultListConfig, { loadingText: "Ladataan..." }); }); if (exists('Ext.form.field.VTypes')) { Ext.apply(Ext.form.field.VTypes, { emailText: 'Syötä tähän kenttään sähköpostiosoite, esim. "etunimi.sukunimi@osoite.fi"', urlText: 'Syötä tähän kenttään URL-osoite, esim. "http:/' + '/www.osoite.fi"', alphaText: 'Syötä tähän kenttään vain kirjaimia (a-z, A-Z) ja alaviivoja (_)', alphanumText: 'Syötä tähän kenttään vain kirjaimia (a-z, A-Z), numeroita (0-9) ja alaviivoja (_)' }); } Ext.define("Ext.locale.fi.form.field.HtmlEditor", { override: "Ext.form.field.HtmlEditor", createLinkText: 'Anna linkin URL-osoite:' }, function() { Ext.apply(Ext.form.field.HtmlEditor.prototype, { buttonTips: { bold: { title: 'Lihavoi (Ctrl+B)', text: 'Lihavoi valittu teksti.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, italic: { title: 'Kursivoi (Ctrl+I)', text: 'Kursivoi valittu teksti.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, underline: { title: 'Alleviivaa (Ctrl+U)', text: 'Alleviivaa valittu teksti.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, increasefontsize: { title: 'Suurenna tekstiä', text: 'Kasvata tekstin kirjasinkokoa.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, decreasefontsize: { title: 'Pienennä tekstiä', text: 'Pienennä tekstin kirjasinkokoa.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, backcolor: { title: 'Tekstin korostusväri', text: 'Vaihda valitun tekstin taustaväriä.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, forecolor: { title: 'Tekstin väri', text: 'Vaihda valitun tekstin väriä.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, justifyleft: { title: 'Tasaa vasemmalle', text: 'Tasaa teksti vasempaan reunaan.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, justifycenter: { title: 'Keskitä', text: 'Keskitä teksti.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, justifyright: { title: 'Tasaa oikealle', text: 'Tasaa teksti oikeaan reunaan.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, insertunorderedlist: { title: 'Luettelo', text: 'Luo luettelo.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, insertorderedlist: { title: 'Numeroitu luettelo', text: 'Luo numeroitu luettelo.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, createlink: { title: 'Linkki', text: 'Tee valitusta tekstistä hyperlinkki.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, sourceedit: { title: 'Lähdekoodin muokkaus', text: 'Vaihda lähdekoodin muokkausnäkymään.', cls: Ext.baseCSSPrefix + 'html-editor-tip' } } }); }); Ext.define("Ext.locale.fi.form.Basic", { override: "Ext.form.Basic", waitTitle: "Odota..." }); Ext.define("Ext.locale.fi.grid.header.Container", { override: "Ext.grid.header.Container", sortAscText: "Järjestä A-Ö", sortDescText: "Järjestä Ö-A", lockText: "Lukitse sarake", unlockText: "Vapauta sarakkeen lukitus", columnsText: "Sarakkeet" }); Ext.define("Ext.locale.fi.grid.GroupingFeature", { override: "Ext.grid.GroupingFeature", emptyGroupText: '(ei mitään)', groupByText: 'Ryhmittele tämän kentän mukaan', showGroupsText: 'Näytä ryhmissä' }); Ext.define("Ext.locale.fi.grid.PropertyColumnModel", { override: "Ext.grid.PropertyColumnModel", nameText: "Nimi", valueText: "Arvo", dateFormat: "j.m.Y" }); });
JavaScript
 /** * France (France) translation * By Thylia * 09-11-2007, 02:22 PM * updated by disizben (22 Sep 2008) * updated by Thylia (20 Apr 2010) */ Ext.onReady(function() { var cm = Ext.ClassManager, exists = Ext.Function.bind(cm.get, cm); if (Ext.Updater) { Ext.Updater.defaults.indicatorText = '<div class="loading-indicator">En cours de chargement...</div>'; } Ext.define("Ext.locale.fr.view.View", { override: "Ext.view.View", emptyText: "" }); Ext.define("Ext.locale.fr.grid.Panel", { override: "Ext.grid.Panel", ddText: "{0} ligne{1} sélectionnée{1}" }); // changing the msg text below will affect the LoadMask Ext.define("Ext.locale.fr.view.AbstractView", { override: "Ext.view.AbstractView", msg: "En cours de chargement..." }); if (Ext.Date) { Ext.Date.shortMonthNames = ["Janv", "Févr", "Mars", "Avr", "Mai", "Juin", "Juil", "Août", "Sept", "Oct", "Nov", "Déc"]; Ext.Date.getShortMonthName = function(month) { return Ext.Date.shortMonthNames[month]; }; Ext.Date.monthNames = ["Janvier", "Février", "Mars", "Avril", "Mai", "Juin", "Juillet", "Août", "Septembre", "Octobre", "Novembre", "Décembre"]; Ext.Date.monthNumbers = { "Janvier": 0, "Janv": 0, "Février": 1, "Févr": 1, "Mars": 2, "Mars": 2, "Avril": 3, "Avr": 3, "Mai": 4, "Juin": 5, "Juillet": 6, "Août": 7, "Septembre": 8, "Sept": 8, "Octobre": 9, "Oct": 9, "Novembre": 10, "Nov": 10, "Décembre": 11, "Déc": 11 }; Ext.Date.getMonthNumber = function(name) { return Ext.Date.monthNumbers[Ext.util.Format.capitalize(name)]; }; Ext.Date.dayNames = ["Dimanche", "Lundi", "Mardi", "Mercredi", "Jeudi", "Vendredi", "Samedi"]; Ext.Date.getShortDayName = function(day) { return Ext.Date.dayNames[day].substring(0, 3); }; Ext.Date.parseCodes.S.s = "(?:er)"; Ext.override(Date, { getSuffix: function() { return (this.getDate() == 1) ? "er" : ""; } }); } if (Ext.MessageBox) { Ext.MessageBox.buttonText = { ok: "OK", cancel: "Annuler", yes: "Oui", no: "Non" }; } if (Ext.util.Format) { Ext.apply(Ext.util.Format, { thousandSeparator: '.', decimalSeparator: ',', currencySign: '\u20ac', // French Euro dateFormat: 'd/m/Y' }); } Ext.define("Ext.locale.fr.picker.Date", { override: "Ext.picker.Date", todayText: "Aujourd'hui", minText: "Cette date est antérieure à la date minimum", maxText: "Cette date est postérieure à la date maximum", disabledDaysText: "", disabledDatesText: "", monthNames: Ext.Date.monthNames, dayNames: Ext.Date.dayNames, nextText: 'Mois suivant (CTRL+Flèche droite)', prevText: "Mois précédent (CTRL+Flèche gauche)", monthYearText: "Choisissez un mois (CTRL+Flèche haut ou bas pour changer d'année.)", todayTip: "{0} (Barre d'espace)", format: "d/m/y", startDay: 1 }); Ext.define("Ext.locale.fr.picker.Month", { override: "Ext.picker.Month", okText: "&#160;OK&#160;", cancelText: "Annuler" }); Ext.define("Ext.locale.fr.toolbar.Paging", { override: "Ext.PagingToolbar", beforePageText: "Page", afterPageText: "sur {0}", firstText: "Première page", prevText: "Page précédente", nextText: "Page suivante", lastText: "Dernière page", refreshText: "Actualiser la page", displayMsg: "Page courante {0} - {1} sur {2}", emptyMsg: 'Aucune donnée à afficher' }); Ext.define("Ext.locale.fr.form.Basic", { override: "Ext.form.Basic", waitTitle: "Veuillez patienter..." }); Ext.define("Ext.locale.fr.form.field.Base", { override: "Ext.form.field.Base", invalidText: "La valeur de ce champ est invalide" }); Ext.define("Ext.locale.fr.form.field.Text", { override: "Ext.form.field.Text", minLengthText: "La longueur minimum de ce champ est de {0} caractère(s)", maxLengthText: "La longueur maximum de ce champ est de {0} caractère(s)", blankText: "Ce champ est obligatoire", regexText: "", emptyText: null }); Ext.define("Ext.locale.fr.form.field.Number", { override: "Ext.form.field.Number", decimalSeparator: ",", decimalPrecision: 2, minText: "La valeur minimum de ce champ doit être de {0}", maxText: "La valeur maximum de ce champ doit être de {0}", nanText: "{0} n'est pas un nombre valide" }); Ext.define("Ext.locale.fr.form.field.Date", { override: "Ext.form.field.Date", disabledDaysText: "Désactivé", disabledDatesText: "Désactivé", minText: "La date de ce champ ne peut être antérieure au {0}", maxText: "La date de ce champ ne peut être postérieure au {0}", invalidText: "{0} n'est pas une date valide - elle doit être au format suivant: {1}", format: "d/m/y", altFormats: "d/m/Y|d-m-y|d-m-Y|d/m|d-m|dm|dmy|dmY|d|Y-m-d" }); Ext.define("Ext.locale.fr.form.field.ComboBox", { override: "Ext.form.field.ComboBox", valueNotFoundText: undefined }, function() { Ext.apply(Ext.form.field.ComboBox.prototype.defaultListConfig, { loadingText: "En cours de chargement..." }); }); if (exists("Ext.form.field.VTypes")) { Ext.apply(Ext.form.field.VTypes, { emailText: 'Ce champ doit contenir une adresse email au format: "usager@example.com"', urlText: 'Ce champ doit contenir une URL au format suivant: "http:/' + '/www.example.com"', alphaText: 'Ce champ ne peut contenir que des lettres et le caractère souligné (_)', alphanumText: 'Ce champ ne peut contenir que des caractères alphanumériques ainsi que le caractère souligné (_)' }); } Ext.define("Ext.locale.fr.form.field.HtmlEditor", { override: "Ext.form.field.HtmlEditor", createLinkText: "Veuillez entrer l'URL pour ce lien:" }, function() { Ext.apply(Ext.form.field.HtmlEditor.prototype, { buttonTips: { bold: { title: 'Gras (Ctrl+B)', text: 'Met le texte sélectionné en gras.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, italic: { title: 'Italique (Ctrl+I)', text: 'Met le texte sélectionné en italique.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, underline: { title: 'Souligné (Ctrl+U)', text: 'Souligne le texte sélectionné.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, increasefontsize: { title: 'Agrandir la police', text: 'Augmente la taille de la police.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, decreasefontsize: { title: 'Réduire la police', text: 'Réduit la taille de la police.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, backcolor: { title: 'Couleur de surbrillance', text: 'Modifie la couleur de fond du texte sélectionné.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, forecolor: { title: 'Couleur de police', text: 'Modifie la couleur du texte sélectionné.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, justifyleft: { title: 'Aligner à gauche', text: 'Aligne le texte à gauche.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, justifycenter: { title: 'Centrer', text: 'Centre le texte.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, justifyright: { title: 'Aligner à droite', text: 'Aligner le texte à droite.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, insertunorderedlist: { title: 'Liste à puce', text: 'Démarre une liste à puce.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, insertorderedlist: { title: 'Liste numérotée', text: 'Démarre une liste numérotée.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, createlink: { title: 'Lien hypertexte', text: 'Transforme en lien hypertexte.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, sourceedit: { title: 'Code source', text: 'Basculer en mode édition du code source.', cls: Ext.baseCSSPrefix + 'html-editor-tip' } } }); }); Ext.define("Ext.locale.fr.grid.header.Container", { override: "Ext.grid.header.Container", sortAscText: "Tri croissant", sortDescText: "Tri décroissant", columnsText: "Colonnes" }); Ext.define("Ext.locale.fr.grid.GroupingFeature", { override: "Ext.grid.GroupingFeature", emptyGroupText: '(Aucun)', groupByText: 'Grouper par ce champ', showGroupsText: 'Afficher par groupes' }); Ext.define("Ext.locale.fr.grid.PropertyColumnModel", { override: "Ext.grid.PropertyColumnModel", nameText: "Propriété", valueText: "Valeur", dateFormat: "d/m/Y", trueText: "vrai", falseText: "faux" }); Ext.define("Ext.locale.fr.form.field.Time", { override: "Ext.form.field.Time", minText: "L'heure de ce champ ne peut être antérieure à {0}", maxText: "L'heure de ce champ ne peut être postérieure à {0}", invalidText: "{0} n'est pas une heure valide", format: "H:i", altFormats: "g:ia|g:iA|g:i a|g:i A|h:i|g:i|H:i|ga|h a|g a|g A|gi|hi|Hi|gia|hia|g|H" }); Ext.define("Ext.locale.fr.form.CheckboxGroup", { override: "Ext.form.CheckboxGroup", blankText: "Vous devez sélectionner au moins un élément dans ce groupe" }); Ext.define("Ext.locale.fr.form.RadioGroup", { override: "Ext.form.RadioGroup", blankText: "Vous devez sélectionner au moins un élément dans ce groupe" }); });
JavaScript
 /** * Serbian Cyrillic Translation * by Čolovic Vladan (cyrillic, utf8 encoding) * sr_RS (ex: sr_CS, sr_YU) * 12 May 2007 */ Ext.onReady(function() { var cm = Ext.ClassManager, exists = Ext.Function.bind(cm.get, cm); if (Ext.Updater) { Ext.Updater.defaults.indicatorText = '<div class="loading-indicator">Учитавам...</div>'; } Ext.define("Ext.locale.sr_RS.view.View", { override: "Ext.view.View", emptyText: "" }); Ext.define("Ext.locale.sr_RS.grid.Panel", { override: "Ext.grid.Panel", ddText: "{0} изабраних редова" }); Ext.define("Ext.locale.sr_RS.TabPanelItem", { override: "Ext.TabPanelItem", closeText: "Затвори ову »картицу«" }); Ext.define("Ext.locale.sr_RS.form.field.Base", { override: "Ext.form.field.Base", invalidText: "Унешена вредност није правилна" }); // changing the msg text below will affect the LoadMask Ext.define("Ext.locale.sr_RS.view.AbstractView", { override: "Ext.view.AbstractView", msg: "Учитавам..." }); if (Ext.Date) { Ext.Date.monthNames = ["Јануар", "Фебруар", "Март", "Април", "Мај", "Јун", "Јул", "Август", "Септембар", "Октобар", "Новембар", "Децембар"]; Ext.Date.dayNames = ["Недеља", "Понедељак", "Уторак", "Среда", "Четвртак", "Петак", "Субота"]; } if (Ext.MessageBox) { Ext.MessageBox.buttonText = { ok: "У реду", cancel: "Одустани", yes: "Да", no: "Не" }; } if (exists('Ext.util.Format')) { Ext.apply(Ext.util.Format, { thousandSeparator: '.', decimalSeparator: ',', currencySign: '\u0414\u0438\u043d\u002e', // Serbian Dinar dateFormat: 'd.m.Y' }); } Ext.define("Ext.locale.sr_RS.picker.Date", { override: "Ext.picker.Date", todayText: "Данас", minText: "Датум је испред најмањег дозвољеног датума", maxText: "Датум је након највећег дозвољеног датума", disabledDaysText: "", disabledDatesText: "", monthNames: Ext.Date.monthNames, dayNames: Ext.Date.dayNames, nextText: 'Следећи месец (Control+Десно)', prevText: 'Претходни месец (Control+Лево)', monthYearText: 'Изаберите месец (Control+Горе/Доле за избор године)', todayTip: "{0} (Размакница)", format: "d.m.y", startDay: 1 }); Ext.define("Ext.locale.sr_RS.toolbar.Paging", { override: "Ext.PagingToolbar", beforePageText: "Страна", afterPageText: "од {0}", firstText: "Прва страна", prevText: "Претходна страна", nextText: "Следећа страна", lastText: "Последња страна", refreshText: "Освежи", displayMsg: "Приказана {0} - {1} од {2}", emptyMsg: 'Немам шта приказати' }); Ext.define("Ext.locale.sr_RS.form.field.Text", { override: "Ext.form.field.Text", minLengthText: "Минимална дужина овог поља је {0}", maxLengthText: "Максимална дужина овог поља је {0}", blankText: "Поље је обавезно", regexText: "", emptyText: null }); Ext.define("Ext.locale.sr_RS.form.field.Number", { override: "Ext.form.field.Number", minText: "Минимална вредност у пољу је {0}", maxText: "Максимална вредност у пољу је {0}", nanText: "{0} није правилан број" }); Ext.define("Ext.locale.sr_RS.form.field.Date", { override: "Ext.form.field.Date", disabledDaysText: "Пасивно", disabledDatesText: "Пасивно", minText: "Датум у овом пољу мора бити након {0}", maxText: "Датум у овом пољу мора бити пре {0}", invalidText: "{0} није правилан датум - захтевани облик је {1}", format: "d.m.y" }); Ext.define("Ext.locale.sr_RS.form.field.ComboBox", { override: "Ext.form.field.ComboBox", valueNotFoundText: undefined }, function() { Ext.apply(Ext.form.field.ComboBox.prototype.defaultListConfig, { loadingText: "Учитавам..." }); }); if (exists('Ext.form.field.VTypes')) { Ext.apply(Ext.form.field.VTypes, { emailText: 'Ово поље прихвата e-mail адресу искључиво у облику "korisnik@domen.com"', urlText: 'Ово поље прихвата URL адресу искључиво у облику "http:/' + '/www.domen.com"', alphaText: 'Ово поље може садржати искључиво слова и знак _', alphanumText: 'Ово поље може садржати само слова, бројеве и знак _' }); } Ext.define("Ext.locale.sr_RS.grid.header.Container", { override: "Ext.grid.header.Container", sortAscText: "Растући редослед", sortDescText: "Опадајући редослед", lockText: "Закључај колону", unlockText: "Откључај колону", columnsText: "Колоне" }); Ext.define("Ext.locale.sr_RS.grid.PropertyColumnModel", { override: "Ext.grid.PropertyColumnModel", nameText: "Назив", valueText: "Вредност", dateFormat: "d.m.Y" }); });
JavaScript
/** * Danish translation * By JohnF * 04-09-2007, 05:28 AM * * Extended and modified by Karl Krukow, * December, 2007. */ Ext.onReady(function() { var cm = Ext.ClassManager, exists = Ext.Function.bind(cm.get, cm); if (Ext.Updater) { Ext.Updater.defaults.indicatorText = '<div class="loading-indicator">Henter...</div>'; } Ext.define("Ext.locale.da.view.View", { override: "Ext.view.View", emptyText: "" }); Ext.define("Ext.locale.da.grid.Panel", { override: "Ext.grid.Panel", ddText: "{0} markerede rækker" }); Ext.define("Ext.locale.da.TabPanelItem", { override: "Ext.TabPanelItem", closeText: "Luk denne fane" }); Ext.define("Ext.locale.da.form.field.Base", { override: "Ext.form.field.Base", invalidText: "Værdien i dette felt er ugyldig" }); // changing the msg text below will affect the LoadMask Ext.define("Ext.locale.da.view.AbstractView", { override: "Ext.view.AbstractView", msg: "Henter..." }); if (Ext.Date) { Ext.Date.monthNames = ["januar", "februar", "marts", "april", "maj", "juni", "juli", "august", "september", "oktober", "november", "december"]; Ext.Date.getShortMonthName = function(month) { return Ext.Date.monthNames[month].substring(0, 3); }; Ext.Date.monthNumbers = { Jan: 0, Feb: 1, Mar: 2, Apr: 3, May: 4, Jun: 5, Jul: 6, Aug: 7, Sep: 8, Oct: 9, Nov: 10, Dec: 11 }; Ext.Date.getMonthNumber = function(name) { return Ext.Date.monthNumbers[name.substring(0, 1).toUpperCase() + name.substring(1, 3).toLowerCase()]; }; Ext.Date.dayNames = ["søndag", "mandag", "tirsdag", "onsdag", "torsdag", "fredag", "lørdag"]; Ext.Date.getShortDayName = function(day) { return Ext.Date.dayNames[day].substring(0, 3); }; } if (Ext.MessageBox) { Ext.MessageBox.buttonText = { ok: "OK", cancel: "Fortryd", yes: "Ja", no: "Nej" }; } if (exists('Ext.util.Format')) { Ext.apply(Ext.util.Format, { thousandSeparator: '.', decimalSeparator: ',', currencySign: 'kr', // Danish Krone dateFormat: 'd/m/Y' }); } Ext.define("Ext.locale.da.picker.Date", { override: "Ext.picker.Date", todayText: "I dag", minText: "Denne dato er før den tidligst tilladte", maxText: "Denne dato er senere end den senest tilladte", disabledDaysText: "", disabledDatesText: "", monthNames: Ext.Date.monthNames, dayNames: Ext.Date.dayNames, nextText: 'Næste måned (Ctrl + højre piltast)', prevText: 'Forrige måned (Ctrl + venstre piltast)', monthYearText: 'Vælg en måned (Ctrl + op/ned pil for at ændre årstal)', todayTip: "{0} (mellemrum)", format: "d/m/y", startDay: 1 }); Ext.define("Ext.locale.da.picker.Month", { override: "Ext.picker.Month", okText: "&#160;OK&#160;", cancelText: "Cancel" }); Ext.define("Ext.locale.da.toolbar.Paging", { override: "Ext.PagingToolbar", beforePageText: "Side", afterPageText: "af {0}", firstText: "Første side", prevText: "Forrige side", nextText: "Næste side", lastText: "Sidste side", refreshText: "Opfrisk", displayMsg: "Viser {0} - {1} af {2}", emptyMsg: 'Der er ingen data at vise' }); Ext.define("Ext.locale.da.form.field.Text", { override: "Ext.form.field.Text", minLengthText: "Minimum længden for dette felt er {0}", maxLengthText: "Maksimum længden for dette felt er {0}", blankText: "Dette felt skal udfyldes", regexText: "", emptyText: null }); Ext.define("Ext.locale.da.form.field.Number", { override: "Ext.form.field.Number", minText: "Mindste-værdien for dette felt er {0}", maxText: "Maksimum-værdien for dette felt er {0}", nanText: "{0} er ikke et tilladt nummer" }); Ext.define("Ext.locale.da.form.field.Date", { override: "Ext.form.field.Date", disabledDaysText: "Inaktiveret", disabledDatesText: "Inaktiveret", minText: "Datoen i dette felt skal være efter {0}", maxText: "Datoen i dette felt skal være før {0}", invalidText: "{0} er ikke en tilladt dato - datoer skal angives i formatet {1}", format: "d/m/y", altFormats: "d/m/Y|d-m-y|d-m-Y|d/m|d-m|dm|dmy|dmY|d|Y-m-d" }); Ext.define("Ext.locale.da.form.field.ComboBox", { override: "Ext.form.field.ComboBox", valueNotFoundText: undefined }, function() { Ext.apply(Ext.form.field.ComboBox.prototype.defaultListConfig, { loadingText: "Henter..." }); }); if (exists('Ext.form.field.VTypes')) { Ext.apply(Ext.form.field.VTypes, { emailText: 'Dette felt skal være en email adresse i formatet "xxx@yyy.zzz"', urlText: 'Dette felt skal være en URL i formatet "http:/' + '/xxx.yyy"', alphaText: 'Dette felt kan kun indeholde bogstaver og "_" (understregning)', alphanumText: 'Dette felt kan kun indeholde bogstaver, tal og "_" (understregning)' }); } Ext.define("Ext.locale.da.form.field.HtmlEditor", { override: "Ext.form.field.HtmlEditor", createLinkText: 'Indtast URL:' }, function() { Ext.apply(Ext.form.field.HtmlEditor.prototype, { buttonTips: { bold: { title: 'Fed (Ctrl+B)', //Can I change this to Ctrl+F? text: 'Formater det markerede tekst med fed.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, italic: { title: 'Kursiv (Ctrl+I)', //Ctrl+K text: 'Formater det markerede tekst med kursiv.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, underline: { title: 'Understreg (Ctrl+U)', text: 'Understreg det markerede tekst.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, increasefontsize: { title: 'Forstør tekst', text: 'Forøg fontstørrelsen.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, decreasefontsize: { title: 'Formindsk tekst', text: 'Formindsk fontstørrelsen.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, backcolor: { title: 'Farve for tekstfremhævelse', text: 'Skift baggrundsfarve for det markerede tekst.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, forecolor: { title: 'Skriftfarve', text: 'Skift skriftfarve for det markerede tekst.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, justifyleft: { title: 'Juster venstre', text: 'Venstrestil tekst.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, justifycenter: { title: 'Centreret', text: 'Centrer tekst.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, justifyright: { title: 'Juster højre', text: 'Højrestil tekst.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, insertunorderedlist: { title: 'Punktopstilling', text: 'Påbegynd punktopstilling.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, insertorderedlist: { title: 'Nummereret opstilling', text: 'Påbegynd nummereret opstilling.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, createlink: { title: 'Hyperlink', text: 'Lav det markerede test til et hyperlink.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, sourceedit: { title: 'Kildetekstredigering', text: 'Skift til redigering af kildetekst.', cls: Ext.baseCSSPrefix + 'html-editor-tip' } } }); }); Ext.define("Ext.locale.da.grid.header.Container", { override: "Ext.grid.header.Container", sortAscText: "Sortér stigende", sortDescText: "Sortér faldende", lockText: "Lås kolonne", unlockText: "Fjern lås fra kolonne", columnsText: "Kolonner" }); Ext.define("Ext.locale.da.grid.GroupingFeature", { override: "Ext.grid.GroupingFeature", emptyGroupText: '(Ingen)', groupByText: 'Gruppér efter dette felt', showGroupsText: 'Vis i grupper' //should this be sort in groups? }); Ext.define("Ext.locale.da.grid.PropertyColumnModel", { override: "Ext.grid.PropertyColumnModel", nameText: "Navn", valueText: "Værdi", dateFormat: "j/m/Y" }); });
JavaScript
/** * List compiled by mystix on the extjs.com forums. * Thank you Mystix! * * Afrikaans Translations * by Thys Meintjes (20 July 2007) */ Ext.onReady(function() { var cm = Ext.ClassManager, exists = Ext.Function.bind(cm.get, cm); if (Ext.Updater) { Ext.Updater.defaults.indicatorText = '<div class="loading-indicator">Besig om te laai...</div>'; } /* Ext single string translations */ Ext.define("Ext.locale.af.view.View", { override: "Ext.view.View", emptyText: "" }); Ext.define("Ext.locale.af.grid.Panel", { override: "Ext.grid.Panel", ddText: "{0} geselekteerde ry(e)" }); Ext.define("Ext.locale.af.TabPanelItem", { override: "Ext.TabPanelItem", closeText: "Maak die oortjie toe" }); Ext.define("Ext.locale.af.form.field.Base", { override: "Ext.form.field.Base", invalidText: "Die waarde in hierdie veld is foutief" }); // changing the msg text below will affect the LoadMask Ext.define("Ext.locale.af.view.AbstractView", { override: "Ext.view.AbstractView", msg: "Besig om te laai..." }); /* Javascript month and days translations */ if (Ext.Date) { Ext.Date.monthNames = ["Januarie", "Februarie", "Maart", "April", "Mei", "Junie", "Julie", "Augustus", "September", "Oktober", "November", "Desember"]; Ext.Date.dayNames = ["Sondag", "Maandag", "Dinsdag", "Woensdag", "Donderdag", "Vrydag", "Saterdag"]; } /* Ext components translations */ if (Ext.MessageBox) { Ext.MessageBox.buttonText = { ok: "OK", cancel: "Kanselleer", yes: "Ja", no: "Nee" }; } if (exists('Ext.util.Format')) { Ext.apply(Ext.util.Format, { thousandSeparator: '.', decimalSeparator: ',', currencySign: 'R', // Sith Efrikan Rand dateFormat: 'd-m-Y' }); } Ext.define("Ext.locale.af.picker.Date", { override: "Ext.picker.Date", todayText: "Vandag", minText: "Hierdie datum is vroër as die minimum datum", maxText: "Hierdie dataum is later as die maximum datum", disabledDaysText: "", disabledDatesText: "", monthNames: Ext.Date.monthNames, dayNames: Ext.Date.dayNames, nextText: 'Volgende Maand (Beheer+Regs)', prevText: 'Vorige Maand (Beheer+Links)', monthYearText: "Kies 'n maand (Beheer+Op/Af volgende/vorige jaar)", todayTip: "{0} (Spasie)", format: "d-m-y", startDay: 0 }); Ext.define("Ext.locale.af.toolbar.Paging", { override: "Ext.PagingToolbar", beforePageText: "Bladsy", afterPageText: "van {0}", firstText: "Eerste Bladsy", prevText: "Vorige Bladsy", nextText: "Volgende Bladsy", lastText: "Laatste Bladsy", refreshText: "Verfris", displayMsg: "Wys {0} - {1} van {2}", emptyMsg: 'Geen data om te wys nie' }); Ext.define("Ext.locale.af.form.field.Text", { override: "Ext.form.field.Text", minLengthText: "Die minimum lengte van die veld is {0}", maxLengthText: "Die maximum lengte van die veld is {0}", blankText: "Die veld is verpligtend", regexText: "", emptyText: null }); Ext.define("Ext.locale.af.form.field.Number", { override: "Ext.form.field.Number", minText: "Die minimum waarde vir die veld is {0}", maxText: "Die maximum waarde vir die veld is {0}", nanText: "{0} is nie 'n geldige waarde nie" }); Ext.define("Ext.locale.af.form.field.Date", { override: "Ext.form.field.Date", disabledDaysText: "Afgeskakel", disabledDatesText: "Afgeskakel", minText: "Die datum in hierdie veld moet na {0} wees", maxText: "Die datum in hierdie veld moet voor {0} wees", invalidText: "{0} is nie 'n geldige datum nie - datumformaat is {1}", format: "d/m/y", altFormats: "d/m/Y|d-m-y|d-m-Y|d/m|d-m|dm|dmy|dmY|d|Y-m-d" }); Ext.define("Ext.locale.af.form.field.ComboBox", { override: "Ext.form.field.ComboBox", valueNotFoundText: undefined }, function() { Ext.apply(Ext.form.field.ComboBox.prototype.defaultListConfig, { loadingText: "Besig om te laai..." }); }); if (exists('Ext.form.field.VTypes')) { Ext.apply(Ext.form.field.VTypes, { emailText: "Hierdie veld moet 'n e-pos adres wees met die formaat 'gebruiker@domein.za'", urlText: "Hierdie veld moet 'n URL wees me die formaat 'http:/'+'/www.domein.za'", alphaText: 'Die veld mag alleenlik letters en _ bevat', alphanumText: 'Die veld mag alleenlik letters, syfers en _ bevat' }); } Ext.define("Ext.locale.af.grid.header.Container", { override: "Ext.grid.header.Container", sortAscText: "Sorteer Oplopend", sortDescText: "Sorteer Aflopend", lockText: "Vries Kolom", unlockText: "Ontvries Kolom", columnsText: "Kolomme" }); Ext.define("Ext.locale.af.grid.PropertyColumnModel", { override: "Ext.grid.PropertyColumnModel", nameText: "Naam", valueText: "Waarde", dateFormat: "Y-m-j" }); });
JavaScript
/** * Pedoman translasi: * http://id.wikisource.org/wiki/Panduan_Pembakuan_Istilah,_Pelaksanaan_Instruksi_Presiden_Nomor_2_Tahun_2001_Tentang_Penggunaan_Komputer_Dengan_Aplikasi_Komputer_Berbahasa_Indonesia * Original source: http://vlsm.org/etc/baku-0.txt * by Farid GS * farid [at] pulen.net * 10:13 04 Desember 2007 * Indonesian Translations */ Ext.onReady(function() { var cm = Ext.ClassManager, exists = Ext.Function.bind(cm.get, cm); if (Ext.Updater) { Ext.Updater.defaults.indicatorText = '<div class="loading-indicator">Pemuatan...</div>'; } Ext.define("Ext.locale.id.view.View", { override: "Ext.view.View", emptyText: "" }); Ext.define("Ext.locale.id.grid.Panel", { override: "Ext.grid.Panel", ddText: "{0} baris terpilih" }); Ext.define("Ext.locale.id.TabPanelItem", { override: "Ext.TabPanelItem", closeText: "Tutup tab ini" }); Ext.define("Ext.locale.id.form.field.Base", { override: "Ext.form.field.Base", invalidText: "Isian belum benar" }); // changing the msg text below will affect the LoadMask Ext.define("Ext.locale.id.view.AbstractView", { override: "Ext.view.AbstractView", msg: "Pemuatan..." }); if (Ext.Date) { Ext.Date.monthNames = ["Januari", "Februari", "Maret", "April", "Mei", "Juni", "Juli", "Agustus", "September", "Oktober", "November", "Desember"]; Ext.Date.getShortMonthName = function(month) { return Ext.Date.monthNames[month].substring(0, 3); }; Ext.Date.monthNumbers = { Jan: 0, Feb: 1, Mar: 2, Apr: 3, Mei: 4, Jun: 5, Jul: 6, Agu: 7, Sep: 8, Okt: 9, Nov: 10, Des: 11 }; Ext.Date.getMonthNumber = function(name) { return Ext.Date.monthNumbers[name.substring(0, 1).toUpperCase() + name.substring(1, 3).toLowerCase()]; }; Ext.Date.dayNames = ["Minggu", "Senin", "Selasa", "Rabu", "Kamis", "Jumat", "Sabtu"]; Ext.Date.getShortDayName = function(day) { return Ext.Date.dayNames[day].substring(0, 3); }; } if (Ext.MessageBox) { Ext.MessageBox.buttonText = { ok: "OK", cancel: "Batal", yes: "Ya", no: "Tidak" }; } if (exists('Ext.util.Format')) { Ext.apply(Ext.util.Format, { thousandSeparator: '.', decimalSeparator: ',', currencySign: 'Rp', // Indonesian Rupiah dateFormat: 'd/m/Y' }); } Ext.define("Ext.locale.id.picker.Date", { override: "Ext.picker.Date", todayText: "Hari ini", minText: "Tanggal ini sebelum batas tanggal minimal", maxText: "Tanggal ini setelah batas tanggal maksimal", disabledDaysText: "", disabledDatesText: "", monthNames: Ext.Date.monthNames, dayNames: Ext.Date.dayNames, nextText: 'Bulan Berikut (Kontrol+Kanan)', prevText: 'Bulan Sebelum (Kontrol+Kiri)', monthYearText: 'Pilih bulan (Kontrol+Atas/Bawah untuk pindah tahun)', todayTip: "{0} (Spacebar)", format: "d/m/y", startDay: 1 }); Ext.define("Ext.locale.id.picker.Month", { override: "Ext.picker.Month", okText: "&#160;OK&#160;", cancelText: "Batal" }); Ext.define("Ext.locale.id.toolbar.Paging", { override: "Ext.PagingToolbar", beforePageText: "Hal", afterPageText: "dari {0}", firstText: "Hal. Pertama", prevText: "Hal. Sebelum", nextText: "Hal. Berikut", lastText: "Hal. Akhir", refreshText: "Segarkan", displayMsg: "Menampilkan {0} - {1} dari {2}", emptyMsg: 'Data tidak ditemukan' }); Ext.define("Ext.locale.id.form.field.Text", { override: "Ext.form.field.Text", minLengthText: "Panjang minimal untuk field ini adalah {0}", maxLengthText: "Panjang maksimal untuk field ini adalah {0}", blankText: "Field ini wajib diisi", regexText: "", emptyText: null }); Ext.define("Ext.locale.id.form.field.Number", { override: "Ext.form.field.Number", minText: "Nilai minimal untuk field ini adalah {0}", maxText: "Nilai maksimal untuk field ini adalah {0}", nanText: "{0} bukan angka" }); Ext.define("Ext.locale.id.form.field.Date", { override: "Ext.form.field.Date", disabledDaysText: "Disfungsi", disabledDatesText: "Disfungsi", minText: "Tanggal dalam field ini harus setelah {0}", maxText: "Tanggal dalam field ini harus sebelum {0}", invalidText: "{0} tanggal salah - Harus dalam format {1}", format: "d/m/y", //altFormats : "m/d/Y|m-d-y|m-d-Y|m/d|m-d|md|mdy|mdY|d|Y-m-d" altFormats: "d/m/Y|d-m-y|d-m-Y|m/d|m-d|md|mdy|mdY|d|Y-m-d" }); Ext.define("Ext.locale.id.form.field.ComboBox", { override: "Ext.form.field.ComboBox", valueNotFoundText: undefined }, function() { Ext.apply(Ext.form.field.ComboBox.prototype.defaultListConfig, { loadingText: "Pemuatan..." }); }); if (exists('Ext.form.field.VTypes')) { Ext.apply(Ext.form.field.VTypes, { emailText: 'Field ini harus dalam format email seperti "user@example.com"', urlText: 'Field ini harus dalam format URL seperti "http:/' + '/www.example.com"', alphaText: 'Field ini harus terdiri dari huruf dan _', alphanumText: 'Field ini haris terdiri dari huruf, angka dan _' }); } Ext.define("Ext.locale.id.form.field.HtmlEditor", { override: "Ext.form.field.HtmlEditor", createLinkText: 'Silakan masukkan URL untuk tautan:' }, function() { Ext.apply(Ext.form.field.HtmlEditor.prototype, { buttonTips: { bold: { title: 'Tebal (Ctrl+B)', text: 'Buat tebal teks terpilih', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, italic: { title: 'Miring (CTRL+I)', text: 'Buat miring teks terpilih', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, underline: { title: 'Garisbawah (CTRl+U)', text: 'Garisbawahi teks terpilih', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, increasefontsize: { title: 'Perbesar teks', text: 'Perbesar ukuran fonta', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, decreasefontsize: { title: 'Perkecil teks', text: 'Perkecil ukuran fonta', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, backcolor: { title: 'Sorot Warna Teks', text: 'Ubah warna latar teks terpilih', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, forecolor: { title: 'Warna Fonta', text: 'Ubah warna teks terpilih', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, justifyleft: { title: 'Rata Kiri', text: 'Ratakan teks ke kiri', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, justifycenter: { title: 'Rata Tengah', text: 'Ratakan teks ke tengah editor', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, justifyright: { title: 'Rata Kanan', text: 'Ratakan teks ke kanan', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, insertunorderedlist: { title: 'Daftar Bulet', text: 'Membuat daftar berbasis bulet', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, insertorderedlist: { title: 'Daftar Angka', text: 'Membuat daftar berbasis angka', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, createlink: { title: 'Hipertaut', text: 'Buat teks terpilih sebagai Hipertaut', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, sourceedit: { title: 'Edit Kode Sumber', text: 'Pindah dalam mode kode sumber', cls: Ext.baseCSSPrefix + 'html-editor-tip' } } }); }); Ext.define("Ext.locale.id.grid.header.Container", { override: "Ext.grid.header.Container", sortAscText: "Urut Naik", sortDescText: "Urut Turun", lockText: "Kancing Kolom", unlockText: "Lepas Kunci Kolom", columnsText: "Kolom" }); Ext.define("Ext.locale.id.grid.GroupingFeature", { override: "Ext.grid.GroupingFeature", emptyGroupText: '(Kosong)', groupByText: 'Kelompokkan Berdasar Field Ini', showGroupsText: 'Tampil Dalam Kelompok' }); Ext.define("Ext.locale.id.grid.PropertyColumnModel", { override: "Ext.grid.PropertyColumnModel", nameText: "Nama", valueText: "Nilai", dateFormat: "d/m/Y" }); });
JavaScript
 /** * List compiled by mystix on the extjs.com forums. * Thank you Mystix! * * Hungarian Translations (utf-8 encoded) * by Amon <amon@theba.hu> (27 Apr 2008) * encoding fixed by Vili (17 Feb 2009) */ Ext.onReady(function() { var cm = Ext.ClassManager, exists = Ext.Function.bind(cm.get, cm); if (Ext.Updater) { Ext.Updater.defaults.indicatorText = '<div class="loading-indicator">Betöltés...</div>'; } Ext.define("Ext.locale.hu.view.View", { override: "Ext.view.View", emptyText: "" }); Ext.define("Ext.locale.hu.grid.Panel", { override: "Ext.grid.Panel", ddText: "{0} kiválasztott sor" }); Ext.define("Ext.locale.hu.TabPanelItem", { override: "Ext.TabPanelItem", closeText: "Fül bezárása" }); Ext.define("Ext.locale.hu.form.field.Base", { override: "Ext.form.field.Base", invalidText: "Hibás érték!" }); // changing the msg text below will affect the LoadMask Ext.define("Ext.locale.hu.view.AbstractView", { override: "Ext.view.AbstractView", msg: "Betöltés..." }); if (Ext.Date) { Ext.Date.monthNames = ["Január", "Február", "Március", "Április", "Május", "Június", "Július", "Augusztus", "Szeptember", "Október", "November", "December"]; Ext.Date.getShortMonthName = function(month) { return Ext.Date.monthNames[month].substring(0, 3); }; Ext.Date.monthNumbers = { 'Jan': 0, 'Feb': 1, 'Már': 2, 'Ápr': 3, 'Máj': 4, 'Jún': 5, 'Júl': 6, 'Aug': 7, 'Sze': 8, 'Okt': 9, 'Nov': 10, 'Dec': 11 }; Ext.Date.getMonthNumber = function(name) { return Ext.Date.monthNumbers[name.substring(0, 1).toUpperCase() + name.substring(1, 3).toLowerCase()]; }; Ext.Date.dayNames = ["Vasárnap", "Hétfő", "Kedd", "Szerda", "Csütörtök", "Péntek", "Szombat"]; Ext.Date.getShortDayName = function(day) { return Ext.Date.dayNames[day].substring(0, 3); }; } if (Ext.MessageBox) { Ext.MessageBox.buttonText = { ok: "OK", cancel: "Mégsem", yes: "Igen", no: "Nem" }; } if (exists('Ext.util.Format')) { Ext.apply(Ext.util.Format, { thousandSeparator: '.', decimalSeparator: ',', currencySign: 'Ft', // Hungarian Forint dateFormat: 'Y m d' }); } Ext.define("Ext.locale.hu.picker.Date", { override: "Ext.picker.Date", todayText: "Mai nap", minText: "A dátum korábbi a megengedettnél", maxText: "A dátum későbbi a megengedettnél", disabledDaysText: "", disabledDatesText: "", monthNames: Ext.Date.monthNames, dayNames: Ext.Date.dayNames, nextText: 'Köv. hónap (CTRL+Jobbra)', prevText: 'Előző hónap (CTRL+Balra)', monthYearText: 'Válassz hónapot (Évválasztás: CTRL+Fel/Le)', todayTip: "{0} (Szóköz)", format: "y-m-d", startDay: 0 }); Ext.define("Ext.locale.hu.picker.Month", { override: "Ext.picker.Month", okText: "&#160;OK&#160;", cancelText: "Mégsem" }); Ext.define("Ext.locale.hu.toolbar.Paging", { override: "Ext.PagingToolbar", beforePageText: "Oldal", afterPageText: "a {0}-ból/ből", firstText: "Első oldal", prevText: "Előző oldal", nextText: "Következő oldal", lastText: "Utolsó oldal", refreshText: "Frissítés", displayMsg: "{0} - {1} sorok láthatók a {2}-ból/ből", emptyMsg: 'Nincs megjeleníthető adat' }); Ext.define("Ext.locale.hu.form.field.Text", { override: "Ext.form.field.Text", minLengthText: "A mező tartalma legalább {0} hosszú kell legyen", maxLengthText: "A mező tartalma legfeljebb {0} hosszú lehet", blankText: "Kötelezően kitöltendő mező", regexText: "", emptyText: null }); Ext.define("Ext.locale.hu.form.field.Number", { override: "Ext.form.field.Number", minText: "A mező tartalma nem lehet kissebb, mint {0}", maxText: "A mező tartalma nem lehet nagyobb, mint {0}", nanText: "{0} nem szám" }); Ext.define("Ext.locale.hu.form.field.Date", { override: "Ext.form.field.Date", disabledDaysText: "Nem választható", disabledDatesText: "Nem választható", minText: "A dátum nem lehet korábbi, mint {0}", maxText: "A dátum nem lehet későbbi, mint {0}", invalidText: "{0} nem megfelelő dátum - a helyes formátum: {1}", format: "Y m d", altFormats: "Y-m-d|y-m-d|y/m/d|m/d|m-d|md|ymd|Ymd|d" }); Ext.define("Ext.locale.hu.form.field.ComboBox", { override: "Ext.form.field.ComboBox", valueNotFoundText: undefined }, function() { Ext.apply(Ext.form.field.ComboBox.prototype.defaultListConfig, { loadingText: "Betöltés..." }); }); if (exists('Ext.form.field.VTypes')) { Ext.apply(Ext.form.field.VTypes, { emailText: 'A mező email címet tartalmazhat, melynek formátuma "felhasználó@szolgáltató.hu"', urlText: 'A mező webcímet tartalmazhat, melynek formátuma "http:/' + '/www.weboldal.hu"', alphaText: 'A mező csak betűket és aláhúzást (_) tartalmazhat', alphanumText: 'A mező csak betűket, számokat és aláhúzást (_) tartalmazhat' }); } Ext.define("Ext.locale.hu.form.field.HtmlEditor", { override: "Ext.form.field.HtmlEditor", createLinkText: 'Add meg a webcímet:' }, function() { Ext.apply(Ext.form.field.HtmlEditor.prototype, { buttonTips: { bold: { title: 'Félkövér (Ctrl+B)', text: 'Félkövérré teszi a kijelölt szöveget.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, italic: { title: 'Dőlt (Ctrl+I)', text: 'Dőlté teszi a kijelölt szöveget.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, underline: { title: 'Aláhúzás (Ctrl+U)', text: 'Aláhúzza a kijelölt szöveget.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, increasefontsize: { title: 'Szöveg nagyítás', text: 'Növeli a szövegméretet.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, decreasefontsize: { title: 'Szöveg kicsinyítés', text: 'Csökkenti a szövegméretet.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, backcolor: { title: 'Háttérszín', text: 'A kijelölt szöveg háttérszínét módosítja.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, forecolor: { title: 'Szövegszín', text: 'A kijelölt szöveg színét módosítja.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, justifyleft: { title: 'Balra zárt', text: 'Balra zárja a szöveget.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, justifycenter: { title: 'Középre zárt', text: 'Középre zárja a szöveget.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, justifyright: { title: 'Jobbra zárt', text: 'Jobbra zárja a szöveget.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, insertunorderedlist: { title: 'Felsorolás', text: 'Felsorolást kezd.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, insertorderedlist: { title: 'Számozás', text: 'Számozott listát kezd.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, createlink: { title: 'Hiperlink', text: 'A kijelölt szöveget linkké teszi.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, sourceedit: { title: 'Forrás nézet', text: 'Forrás nézetbe kapcsol.', cls: Ext.baseCSSPrefix + 'html-editor-tip' } } }); }); Ext.define("Ext.locale.hu.grid.header.Container", { override: "Ext.grid.header.Container", sortAscText: "Növekvő rendezés", sortDescText: "Csökkenő rendezés", lockText: "Oszlop zárolás", unlockText: "Oszlop feloldás", columnsText: "Oszlopok" }); Ext.define("Ext.locale.hu.grid.GroupingFeature", { override: "Ext.grid.GroupingFeature", emptyGroupText: '(Nincs)', groupByText: 'Oszlop szerint csoportosítás', showGroupsText: 'Csoportos nézet' }); Ext.define("Ext.locale.hu.grid.PropertyColumnModel", { override: "Ext.grid.PropertyColumnModel", nameText: "Név", valueText: "Érték", dateFormat: "Y m j" }); });
JavaScript
/** * Slovenian translation by Matjaž (UTF-8 encoding) * 25 April 2007 */ Ext.onReady(function() { var cm = Ext.ClassManager, exists = Ext.Function.bind(cm.get, cm); if (Ext.Updater) { Ext.Updater.defaults.indicatorText = '<div class="loading-indicator">Nalagam...</div>'; } Ext.define("Ext.locale.sl.view.View", { override: "Ext.view.View", emptyText: "" }); Ext.define("Ext.locale.sl.grid.Panel", { override: "Ext.grid.Panel", ddText: "{0} izbranih vrstic" }); Ext.define("Ext.locale.sl.TabPanelItem", { override: "Ext.TabPanelItem", closeText: "Zapri zavihek" }); Ext.define("Ext.locale.sl.form.field.Base", { override: "Ext.form.field.Base", invalidText: "Neveljavna vrednost" }); // changing the msg text below will affect the LoadMask Ext.define("Ext.locale.sl.view.AbstractView", { override: "Ext.view.AbstractView", msg: "Nalagam..." }); if (Ext.Date) { Ext.Date.monthNames = ["Januar", "Februar", "Marec", "April", "Maj", "Junij", "Julij", "Avgust", "September", "Oktober", "November", "December"]; Ext.Date.dayNames = ["Nedelja", "Ponedeljek", "Torek", "Sreda", "Četrtek", "Petek", "Sobota"]; } if (Ext.MessageBox) { Ext.MessageBox.buttonText = { ok: "V redu", cancel: "Prekliči", yes: "Da", no: "Ne" }; } if (exists('Ext.util.Format')) { Ext.apply(Ext.util.Format, { thousandSeparator: '.', decimalSeparator: ',', currencySign: '\u20ac', // Slovenian Euro dateFormat: 'd.m.Y' }); } Ext.define("Ext.locale.sl.picker.Date", { override: "Ext.picker.Date", todayText: "Danes", minText: "Navedeni datum je pred spodnjim datumom", maxText: "Navedeni datum je za zgornjim datumom", disabledDaysText: "", disabledDatesText: "", monthNames: Ext.Date.monthNames, dayNames: Ext.Date.dayNames, nextText: 'Naslednji mesec (Control+Desno)', prevText: 'Prejšnji mesec (Control+Levo)', monthYearText: 'Izberite mesec (Control+Gor/Dol za premik let)', todayTip: "{0} (Preslednica)", format: "d.m.y", startDay: 1 }); Ext.define("Ext.locale.sl.toolbar.Paging", { override: "Ext.PagingToolbar", beforePageText: "Stran", afterPageText: "od {0}", firstText: "Prva stran", prevText: "Prejšnja stran", nextText: "Naslednja stran", lastText: "Zadnja stran", refreshText: "Osveži", displayMsg: "Prikazujem {0} - {1} od {2}", emptyMsg: 'Ni podatkov za prikaz' }); Ext.define("Ext.locale.sl.form.field.Text", { override: "Ext.form.field.Text", minLengthText: "Minimalna dolžina tega polja je {0}", maxLengthText: "Maksimalna dolžina tega polja je {0}", blankText: "To polje je obvezno", regexText: "", emptyText: null }); Ext.define("Ext.locale.sl.form.field.Number", { override: "Ext.form.field.Number", minText: "Minimalna vrednost tega polja je {0}", maxText: "Maksimalna vrednost tega polja je {0}", nanText: "{0} ni veljavna številka" }); Ext.define("Ext.locale.sl.form.field.Date", { override: "Ext.form.field.Date", disabledDaysText: "Onemogočen", disabledDatesText: "Onemogočen", minText: "Datum mora biti po {0}", maxText: "Datum mora biti pred {0}", invalidText: "{0} ni veljaven datum - mora biti v tem formatu {1}", format: "d.m.y" }); Ext.define("Ext.locale.sl.form.field.ComboBox", { override: "Ext.form.field.ComboBox", valueNotFoundText: undefined }, function() { Ext.apply(Ext.form.field.ComboBox.prototype.defaultListConfig, { loadingText: "Nalagam..." }); }); if (exists('Ext.form.field.VTypes')) { Ext.apply(Ext.form.field.VTypes, { emailText: 'To polje je e-mail naslov formata "ime@domena.si"', urlText: 'To polje je URL naslov formata "http:/' + '/www.domena.si"', alphaText: 'To polje lahko vsebuje samo črke in _', alphanumText: 'To polje lahko vsebuje samo črke, številke in _' }); } Ext.define("Ext.locale.sl.grid.header.Container", { override: "Ext.grid.header.Container", sortAscText: "Sortiraj naraščajoče", sortDescText: "Sortiraj padajoče", lockText: "Zakleni stolpec", unlockText: "Odkleni stolpec", columnsText: "Stolpci" }); Ext.define("Ext.locale.sl.grid.PropertyColumnModel", { override: "Ext.grid.PropertyColumnModel", nameText: "Ime", valueText: "Vrednost", dateFormat: "j.m.Y" }); });
JavaScript
/** * * Norwegian translation (Bokmål: no-NB) * By Tore Kjørsvik 21-January-2008 * */ Ext.onReady(function() { var cm = Ext.ClassManager, exists = Ext.Function.bind(cm.get, cm); if (Ext.Updater) { Ext.Updater.defaults.indicatorText = '<div class="loading-indicator">Laster...</div>'; } Ext.define("Ext.locale.no_NB.view.View", { override: "Ext.view.View", emptyText: "" }); Ext.define("Ext.locale.no_NB.grid.Panel", { override: "Ext.grid.Panel", ddText: "{0} markert(e) rad(er)" }); Ext.define("Ext.locale.no_NB.TabPanelItem", { override: "Ext.TabPanelItem", closeText: "Lukk denne fanen" }); Ext.define("Ext.locale.no_NB.form.field.Base", { override: "Ext.form.field.Base", invalidText: "Verdien i dette feltet er ugyldig" }); // changing the msg text below will affect the LoadMask Ext.define("Ext.locale.no_NB.view.AbstractView", { override: "Ext.view.AbstractView", msg: "Laster..." }); if (Ext.Date) { Ext.Date.monthNames = ["Januar", "Februar", "Mars", "April", "Mai", "Juni", "Juli", "August", "September", "Oktober", "November", "Desember"]; Ext.Date.getShortMonthName = function(month) { return Ext.Date.monthNames[month].substring(0, 3); }; Ext.Date.monthNumbers = { Jan: 0, Feb: 1, Mar: 2, Apr: 3, Mai: 4, Jun: 5, Jul: 6, Aug: 7, Sep: 8, Okt: 9, Nov: 10, Des: 11 }; Ext.Date.getMonthNumber = function(name) { return Ext.Date.monthNumbers[name.substring(0, 1).toUpperCase() + name.substring(1, 3).toLowerCase()]; }; Ext.Date.dayNames = ["Søndag", "Mandag", "Tirsdag", "Onsdag", "Torsdag", "Fredag", "Lørdag"]; Ext.Date.getShortDayName = function(day) { return Ext.Date.dayNames[day].substring(0, 3); }; } if (Ext.MessageBox) { Ext.MessageBox.buttonText = { ok: "OK", cancel: "Avbryt", yes: "Ja", no: "Nei" }; } if (exists('Ext.util.Format')) { Ext.apply(Ext.util.Format, { thousandSeparator: '.', decimalSeparator: ',', currencySign: 'kr', // Norwegian Krone dateFormat: 'd.m.Y' }); } Ext.define("Ext.locale.no_NB.picker.Date", { override: "Ext.picker.Date", todayText: "I dag", minText: "Denne datoen er før tidligste tillatte dato", maxText: "Denne datoen er etter seneste tillatte dato", disabledDaysText: "", disabledDatesText: "", monthNames: Ext.Date.monthNames, dayNames: Ext.Date.dayNames, nextText: 'Neste måned (Control+Pil Høyre)', prevText: 'Forrige måned (Control+Pil Venstre)', monthYearText: 'Velg en måned (Control+Pil Opp/Ned for å skifte år)', todayTip: "{0} (Mellomrom)", format: "d.m.y", startDay: 1 }); Ext.define("Ext.locale.no_NB.picker.Month", { override: "Ext.picker.Month", okText: "&#160;OK&#160;", cancelText: "Avbryt" }); Ext.define("Ext.locale.no_NB.toolbar.Paging", { override: "Ext.PagingToolbar", beforePageText: "Side", afterPageText: "av {0}", firstText: "Første side", prevText: "Forrige side", nextText: "Neste side", lastText: "Siste side", refreshText: "Oppdater", displayMsg: "Viser {0} - {1} av {2}", emptyMsg: 'Ingen data å vise' }); Ext.define("Ext.locale.no_NB.form.field.Text", { override: "Ext.form.field.Text", minLengthText: "Den minste lengden for dette feltet er {0}", maxLengthText: "Den største lengden for dette feltet er {0}", blankText: "Dette feltet er påkrevd", regexText: "", emptyText: null }); Ext.define("Ext.locale.no_NB.form.field.Number", { override: "Ext.form.field.Number", minText: "Den minste verdien for dette feltet er {0}", maxText: "Den største verdien for dette feltet er {0}", nanText: "{0} er ikke et gyldig nummer" }); Ext.define("Ext.locale.no_NB.form.field.Date", { override: "Ext.form.field.Date", disabledDaysText: "Deaktivert", disabledDatesText: "Deaktivert", minText: "Datoen i dette feltet må være etter {0}", maxText: "Datoen i dette feltet må være før {0}", invalidText: "{0} er ikke en gyldig dato - den må være på formatet {1}", format: "d.m.y", altFormats: "d.m.Y|d/m/y|d/m/Y|d-m-y|d-m-Y|d.m|d/m|d-m|dm|dmy|dmY|Y-m-d|d" }); Ext.define("Ext.locale.no_NB.form.field.ComboBox", { override: "Ext.form.field.ComboBox", valueNotFoundText: undefined }, function() { Ext.apply(Ext.form.field.ComboBox.prototype.defaultListConfig, { loadingText: "Laster..." }); }); if (exists('Ext.form.field.VTypes')) { Ext.apply(Ext.form.field.VTypes, { emailText: 'Dette feltet skal være en epost adresse på formatet "bruker@domene.no"', urlText: 'Dette feltet skal være en link (URL) på formatet "http:/' + '/www.domene.no"', alphaText: 'Dette feltet skal kun inneholde bokstaver og _', alphanumText: 'Dette feltet skal kun inneholde bokstaver, tall og _' }); } Ext.define("Ext.locale.no_NB.form.field.HtmlEditor", { override: "Ext.form.field.HtmlEditor", createLinkText: 'Vennligst skriv inn URL for lenken:' }, function() { Ext.apply(Ext.form.field.HtmlEditor.prototype, { buttonTips: { bold: { title: 'Fet (Ctrl+B)', text: 'Gjør den valgte teksten fet.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, italic: { title: 'Kursiv (Ctrl+I)', text: 'Gjør den valgte teksten kursiv.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, underline: { title: 'Understrek (Ctrl+U)', text: 'Understrek den valgte teksten.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, increasefontsize: { title: 'Forstørr tekst', text: 'Gjør fontstørrelse større.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, decreasefontsize: { title: 'Forminsk tekst', text: 'Gjør fontstørrelse mindre.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, backcolor: { title: 'Tekst markeringsfarge', text: 'Endre bakgrunnsfarge til den valgte teksten.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, forecolor: { title: 'Font farge', text: 'Endre farge på den valgte teksten.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, justifyleft: { title: 'Venstrejuster tekst', text: 'Venstrejuster teksten.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, justifycenter: { title: 'Sentrer tekst', text: 'Sentrer teksten.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, justifyright: { title: 'Høyrejuster tekst', text: 'Høyrejuster teksten.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, insertunorderedlist: { title: 'Punktliste', text: 'Start en punktliste.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, insertorderedlist: { title: 'Nummerert liste', text: 'Start en nummerert liste.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, createlink: { title: 'Lenke', text: 'Gjør den valgte teksten til en lenke.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, sourceedit: { title: 'Rediger kilde', text: 'Bytt til kilderedigeringsvisning.', cls: Ext.baseCSSPrefix + 'html-editor-tip' } } }); }); Ext.define("Ext.locale.no_NB.grid.header.Container", { override: "Ext.grid.header.Container", sortAscText: "Sorter stigende", sortDescText: "Sorter synkende", lockText: "Lås kolonne", unlockText: "Lås opp kolonne", columnsText: "Kolonner" }); Ext.define("Ext.locale.no_NB.grid.GroupingFeature", { override: "Ext.grid.GroupingFeature", emptyGroupText: '(Ingen)', groupByText: 'Grupper etter dette feltet', showGroupsText: 'Vis i grupper' }); Ext.define("Ext.locale.no_NB.grid.PropertyColumnModel", { override: "Ext.grid.PropertyColumnModel", nameText: "Navn", valueText: "Verdi", dateFormat: "d.m.Y" }); });
JavaScript
 /** * France (Canadian) translation * By BernardChhun * 04-08-2007, 03:07 AM */ Ext.onReady(function() { var cm = Ext.ClassManager, exists = Ext.Function.bind(cm.get, cm); if (Ext.Updater) { Ext.Updater.defaults.indicatorText = '<div class="loading-indicator">En cours de chargement...</div>'; } Ext.define("Ext.locale.fr_CA.view.View", { override: "Ext.view.View", emptyText: "" }); Ext.define("Ext.locale.fr_CA.grid.Panel", { override: "Ext.grid.Panel", ddText: "{0} ligne(s) sélectionné(s)" }); Ext.define("Ext.locale.fr_CA.TabPanelItem", { override: "Ext.TabPanelItem", closeText: "Fermer cette onglet" }); Ext.define("Ext.locale.fr_CA.form.field.Base", { override: "Ext.form.field.Base", invalidText: "La valeur de ce champ est invalide" }); // changing the msg text below will affect the LoadMask Ext.define("Ext.locale.fr_CA.view.AbstractView", { override: "Ext.view.AbstractView", msg: "En cours de chargement..." }); if (Ext.Date) { Ext.Date.shortMonthNames = ["Janv", "Févr", "Mars", "Avr", "Mai", "Juin", "Juil", "Août", "Sept", "Oct", "Nov", "Déc"]; Ext.Date.getShortMonthName = function(month) { return Ext.Date.shortMonthNames[month]; }; Ext.Date.monthNames = ["Janvier", "Février", "Mars", "Avril", "Mai", "Juin", "Juillet", "Août", "Septembre", "Octobre", "Novembre", "Décembre"]; Ext.Date.monthNumbers = { "Janvier": 0, "Janv": 0, "Février": 1, "Févr": 1, "Mars": 2, "Mars": 2, "Avril": 3, "Avr": 3, "Mai": 4, "Juin": 5, "Juillet": 6, "Août": 7, "Septembre": 8, "Sept": 8, "Octobre": 9, "Oct": 9, "Novembre": 10, "Nov": 10, "Décembre": 11, "Déc": 11 }; Ext.Date.getMonthNumber = function(name) { return Ext.Date.monthNumbers[Ext.util.Format.capitalize(name)]; }; Ext.Date.dayNames = ["Dimanche", "Lundi", "Mardi", "Mercredi", "Jeudi", "Vendredi", "Samedi"]; Ext.Date.getShortDayName = function(day) { return Ext.Date.dayNames[day].substring(0, 3); }; } if (Ext.MessageBox) { Ext.MessageBox.buttonText = { ok: "OK", cancel: "Annuler", yes: "Oui", no: "Non" }; } if (exists('Ext.util.Format')) { Ext.apply(Ext.util.Format, { thousandSeparator: '.', decimalSeparator: ',', currencySign: '$', // Canadian Dollar dateFormat: 'd/m/Y' }); } Ext.define("Ext.locale.fr_CA.picker.Date", { override: "Ext.picker.Date", todayText: "Aujourd'hui", minText: "Cette date est plus petite que la date minimum", maxText: "Cette date est plus grande que la date maximum", disabledDaysText: "", disabledDatesText: "", monthNames: Ext.Date.monthNames, dayNames: Ext.Date.dayNames, nextText: 'Prochain mois (CTRL+Fléche droite)', prevText: 'Mois précédent (CTRL+Fléche gauche)', monthYearText: 'Choissisez un mois (CTRL+Fléche haut ou bas pour changer d\'année.)', todayTip: "{0} (Barre d'espace)", format: "d/m/y" }); Ext.define("Ext.locale.fr_CA.toolbar.Paging", { override: "Ext.PagingToolbar", beforePageText: "Page", afterPageText: "de {0}", firstText: "Première page", prevText: "Page précédente", nextText: "Prochaine page", lastText: "Dernière page", refreshText: "Recharger la page", displayMsg: "Page courante {0} - {1} de {2}", emptyMsg: 'Aucune donnée à afficher' }); Ext.define("Ext.locale.fr_CA.form.field.Text", { override: "Ext.form.field.Text", minLengthText: "La longueur minimum de ce champ est de {0} caractères", maxLengthText: "La longueur maximum de ce champ est de {0} caractères", blankText: "Ce champ est obligatoire", regexText: "", emptyText: null }); Ext.define("Ext.locale.fr_CA.form.field.Number", { override: "Ext.form.field.Number", minText: "La valeur minimum de ce champ doit être de {0}", maxText: "La valeur maximum de ce champ doit être de {0}", nanText: "{0} n'est pas un nombre valide" }); Ext.define("Ext.locale.fr_CA.form.field.Date", { override: "Ext.form.field.Date", disabledDaysText: "Désactivé", disabledDatesText: "Désactivé", minText: "La date de ce champ doit être avant le {0}", maxText: "La date de ce champ doit être après le {0}", invalidText: "{0} n'est pas une date valide - il doit être au format suivant: {1}", format: "d/m/y" }); Ext.define("Ext.locale.fr_CA.form.field.ComboBox", { override: "Ext.form.field.ComboBox", valueNotFoundText: undefined }, function() { Ext.apply(Ext.form.field.ComboBox.prototype.defaultListConfig, { loadingText: "En cours de chargement..." }); }); if (exists('Ext.form.field.VTypes')) { Ext.apply(Ext.form.field.VTypes, { emailText: 'Ce champ doit contenir un courriel et doit être sous ce format: "usager@example.com"', urlText: 'Ce champ doit contenir une URL sous le format suivant: "http:/' + '/www.example.com"', alphaText: 'Ce champ ne peut contenir que des lettres et le caractère souligné (_)', alphanumText: 'Ce champ ne peut contenir que des caractères alphanumériques ainsi que le caractère souligné (_)' }); } Ext.define("Ext.locale.fr_CA.grid.header.Container", { override: "Ext.grid.header.Container", sortAscText: "Tri ascendant", sortDescText: "Tri descendant", lockText: "Verrouillé la colonne", unlockText: "Déverrouillé la colonne", columnsText: "Colonnes" }); Ext.define("Ext.locale.fr_CA.grid.PropertyColumnModel", { override: "Ext.grid.PropertyColumnModel", nameText: "Propriété", valueText: "Valeur", dateFormat: "d/m/Y" }); });
JavaScript
/** * Italian translation * By eric_void * 04-10-2007, 11:25 AM * Updated by Federico Grilli 21/12/2007 */ Ext.onReady(function() { var cm = Ext.ClassManager, exists = Ext.Function.bind(cm.get, cm); if (Ext.Updater) { Ext.Updater.defaults.indicatorText = '<div class="loading-indicator">Caricamento in corso...</div>'; } Ext.define("Ext.locale.it.view.View", { override: "Ext.view.View", emptyText: "" }); Ext.define("Ext.locale.it.grid.Panel", { override: "Ext.grid.Panel", ddText: "{0} righe selezionate" }); Ext.define("Ext.locale.it.TabPanelItem", { override: "Ext.TabPanelItem", closeText: "Chiudi pannello" }); Ext.define("Ext.locale.it.form.field.Base", { override: "Ext.form.field.Base", invalidText: "Valore non valido" }); // changing the msg text below will affect the LoadMask Ext.define("Ext.locale.it.view.AbstractView", { override: "Ext.view.AbstractView", msg: "Caricamento in corso..." }); if (Ext.Date) { Ext.Date.monthNames = ["Gennaio", "Febbraio", "Marzo", "Aprile", "Maggio", "Giugno", "Luglio", "Agosto", "Settembre", "Ottobre", "Novembre", "Dicembre"]; Ext.Date.getShortMonthName = function(month) { return Ext.Date.monthNames[month].substring(0, 3); }; Ext.Date.monthNumbers = { Gen: 0, Feb: 1, Mar: 2, Apr: 3, Mag: 4, Giu: 5, Lug: 6, Ago: 7, Set: 8, Ott: 9, Nov: 10, Dic: 11 }; Ext.Date.getMonthNumber = function(name) { return Ext.Date.monthNumbers[name.substring(0, 1).toUpperCase() + name.substring(1, 3).toLowerCase()]; }; Ext.Date.dayNames = ["Domenica", "Luned\u00EC", "Marted\u00EC", "Mercoled\u00EC", "Gioved\u00EC", "Venerd\u00EC", "Sabato"]; Ext.Date.getShortDayName = function(day) { return Ext.Date.dayNames[day].substring(0, 3); }; } if (Ext.MessageBox) { Ext.MessageBox.buttonText = { ok: "OK", cancel: "Annulla", yes: "S\u00EC", no: "No" }; } if (exists('Ext.util.Format')) { Ext.apply(Ext.util.Format, { thousandSeparator: '.', decimalSeparator: ',', currencySign: '\u20ac', // Italian Euro dateFormat: 'd/m/Y' }); } Ext.define("Ext.locale.it.picker.Date", { override: "Ext.picker.Date", todayText: "Oggi", minText: "Data precedente alla data minima", maxText: "Data successiva alla data massima", disabledDaysText: "", disabledDatesText: "", monthNames: Ext.Date.monthNames, dayNames: Ext.Date.dayNames, nextText: 'Mese successivo (Ctrl+Destra)', prevText: 'Mese precedente (Ctrl+Sinistra)', monthYearText: 'Scegli un mese (Ctrl+Su/Giu per cambiare anno)', todayTip: "{0} (Barra spaziatrice)", format: "d/m/y", startDay: 1 }); Ext.define("Ext.locale.it.picker.Month", { override: "Ext.picker.Month", okText: "&#160;OK&#160;", cancelText: "Annulla" }); Ext.define("Ext.locale.it.toolbar.Paging", { override: "Ext.PagingToolbar", beforePageText: "Pagina", afterPageText: "di {0}", firstText: "Prima pagina", prevText: "Pagina precedente", nextText: "Pagina successiva", lastText: "Ultima pagina", refreshText: "Aggiorna", displayMsg: "Record {0} - {1} di {2}", emptyMsg: 'Nessun dato da mostrare' }); Ext.define("Ext.locale.it.form.field.Text", { override: "Ext.form.field.Text", minLengthText: "La lunghezza minima \u00E8 {0}", maxLengthText: "La lunghezza massima \u00E8 {0}", blankText: "Campo obbligatorio", regexText: "", emptyText: null }); Ext.define("Ext.locale.it.form.field.Number", { override: "Ext.form.field.Number", minText: "Il valore minimo \u00E8 {0}", maxText: "Il valore massimo \u00E8 {0}", nanText: "{0} non \u00E8 un valore numerico corretto", decimalSeparator: ',' }); Ext.define("Ext.locale.it.form.field.Date", { override: "Ext.form.field.Date", disabledDaysText: "Disabilitato", disabledDatesText: "Disabilitato", minText: "La data deve essere successiva al {0}", maxText: "La data deve essere precedente al {0}", invalidText: "{0} non \u00E8 una data valida. Deve essere nel formato {1}", format: "d/m/y", altFormats: "d/m/Y|d-m-y|d-m-Y|d/m|d-m|dm|dmy|dmY|d|Y-m-d" }); Ext.define("Ext.locale.it.form.field.ComboBox", { override: "Ext.form.field.ComboBox", valueNotFoundText: undefined }, function() { Ext.apply(Ext.form.field.ComboBox.prototype.defaultListConfig, { loadingText: "Caricamento in corso..." }); }); if (exists('Ext.form.field.VTypes')) { Ext.apply(Ext.form.field.VTypes, { emailText: 'Il campo deve essere un indirizzo e-mail nel formato "user@example.com"', urlText: 'Il campo deve essere un indirizzo web nel formato "http:/' + '/www.example.com"', alphaText: 'Il campo deve contenere solo lettere e _', alphanumText: 'Il campo deve contenere solo lettere, numeri e _' }); } Ext.define("Ext.locale.it.form.field.HtmlEditor", { override: "Ext.form.field.HtmlEditor", createLinkText: 'Inserire un URL per il link:' }, function() { Ext.apply(Ext.form.field.HtmlEditor.prototype, { buttonTips: { bold: { title: 'Grassetto (Ctrl+B)', text: 'Rende il testo selezionato in grassetto.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, italic: { title: 'Corsivo (Ctrl+I)', text: 'Rende il testo selezionato in corsivo.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, underline: { title: 'Sottolinea (Ctrl+U)', text: 'Sottolinea il testo selezionato.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, increasefontsize: { title: 'Ingrandisci testo', text: 'Aumenta la dimensione del carattere.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, decreasefontsize: { title: 'Rimpicciolisci testo', text: 'Diminuisce la dimensione del carattere.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, backcolor: { title: 'Colore evidenziatore testo', text: 'Modifica il colore di sfondo del testo selezionato.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, forecolor: { title: 'Colore carattere', text: 'Modifica il colore del testo selezionato.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, justifyleft: { title: 'Allinea a sinistra', text: 'Allinea il testo a sinistra.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, justifycenter: { title: 'Centra', text: 'Centra il testo.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, justifyright: { title: 'Allinea a destra', text: 'Allinea il testo a destra.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, insertunorderedlist: { title: 'Elenco puntato', text: 'Elenco puntato.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, insertorderedlist: { title: 'Elenco numerato', text: 'Elenco numerato.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, createlink: { title: 'Collegamento', text: 'Trasforma il testo selezionato in un collegamanto.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, sourceedit: { title: 'Sorgente', text: 'Passa alla modalit\u00E0 editing del sorgente.', cls: Ext.baseCSSPrefix + 'html-editor-tip' } } }); }); Ext.define("Ext.locale.it.grid.header.Container", { override: "Ext.grid.header.Container", sortAscText: "Ordinamento crescente", sortDescText: "Ordinamento decrescente", lockText: "Blocca colonna", unlockText: "Sblocca colonna", columnsText: "Colonne" }); Ext.define("Ext.locale.it.grid.GroupingFeature", { override: "Ext.grid.GroupingFeature", emptyGroupText: '(Nessun dato)', groupByText: 'Raggruppa per questo campo', showGroupsText: 'Mostra nei gruppi' }); Ext.define("Ext.locale.it.grid.PropertyColumnModel", { override: "Ext.grid.PropertyColumnModel", nameText: "Nome", valueText: "Valore", dateFormat: "j/m/Y" }); });
JavaScript
/** * List compiled by mystix on the extjs.com forums. * Thank you Mystix! * * Turkish translation by Alper YAZGAN * 2008-01-24, 10:29 AM * * Updated to 2.2 by YargicX * 2008-10-05, 06:22 PM */ Ext.onReady(function() { var cm = Ext.ClassManager, exists = Ext.Function.bind(cm.get, cm); if (Ext.Updater) { Ext.Updater.defaults.indicatorText = '<div class="loading-indicator">Yükleniyor ...</div>'; } Ext.define("Ext.locale.tr.view.View", { override: "Ext.view.View", emptyText: "" }); Ext.define("Ext.locale.tr.grid.Grid", { override: "Ext.grid.Grid", ddText: "Seçili satýr sayýsý : {0}" }); Ext.define("Ext.locale.tr.TabPanelItem", { override: "Ext.TabPanelItem", closeText: "Sekmeyi kapat" }); Ext.define("Ext.locale.tr.form.field.Base", { override: "Ext.form.field.Base", invalidText: "Bu alandaki deðer geçersiz" }); // changing the msg text below will affect the LoadMask Ext.define("Ext.locale.tr.view.AbstractView", { override: "Ext.view.AbstractView", msg: "Yükleniyor ..." }); if (Ext.Date) { Ext.Date.monthNames = ["Ocak", "Þžubat", "Mart", "Nisan", "Mayýs", "Haziran", "Temmuz", "Aðustos", "Eylül", "Ekim", "Kasým", "Aralýk"]; Ext.Date.getShortMonthName = function(month) { return Ext.Date.monthNames[month].substring(0, 3); }; Ext.Date.monthNumbers = { Jan: 0, Feb: 1, Mar: 2, Apr: 3, May: 4, Jun: 5, Jul: 6, Aug: 7, Sep: 8, Oct: 9, Nov: 10, Dec: 11 }; Ext.Date.getMonthNumber = function(name) { return Ext.Date.monthNumbers[name.substring(0, 1).toUpperCase() + name.substring(1, 3).toLowerCase()]; }; Ext.Date.dayNames = ["Pazar", "Pazartesi", "Salý", "LJarþŸamba", "PerþŸembe", "Cuma", "Cumartesi"]; Ext.Date.shortDayNames = ["Paz", "Pzt", "Sal", "ÇrþŸ", "Prþ", "Cum", "Cmt"]; Ext.Date.getShortDayName = function(day) { return Ext.Date.shortDayNames[day]; }; } if (Ext.MessageBox) { Ext.MessageBox.buttonText = { ok: "Tamam", cancel: "İptal", yes: "Evet", no: "Hayýr" }; } if (exists('Ext.util.Format')) { Ext.apply(Ext.util.Format, { thousandSeparator: '.', decimalSeparator: ',', currencySign: 'TL', // Turkish Lira dateFormat: 'd/m/Y' }); } Ext.define("Ext.locale.tr.picker.Date", { override: "Ext.picker.Date", todayText: "Bugün", minText: "Bu tarih izin verilen en küçük tarihten daha önce", maxText: "Bu tarih izin verilen en büyük tarihten daha sonra", disabledDaysText: "", disabledDatesText: "", monthNames: Ext.Date.monthNames, dayNames: Ext.Date.dayNames, nextText: 'Gelecek Ay (Control+Right)', prevText: 'Önceki Ay (Control+Left)', monthYearText: 'Bir ay sŸeçiniz (Yýlý artýrmak/azaltmak için Control+Up/Down)', todayTip: "{0} (BoþŸluk TuþŸu - Spacebar)", format: "d/m/Y", startDay: 1 }); Ext.define("Ext.locale.tr.picker.Month", { override: "Ext.picker.Month", okText: "&#160;Tamam&#160;", cancelText: "İptal" }); Ext.define("Ext.locale.tr.toolbar.Paging", { override: "Ext.PagingToolbar", beforePageText: "Sayfa", afterPageText: " / {0}", firstText: "İlk Sayfa", prevText: "Önceki Sayfa", nextText: "Sonraki Sayfa", lastText: "Son Sayfa", refreshText: "Yenile", displayMsg: "Gösterilen {0} - {1} / {2}", emptyMsg: 'Gösterilebilecek veri yok' }); Ext.define("Ext.locale.tr.form.field.Text", { override: "Ext.form.field.Text", minLengthText: "Girilen verinin uzunluðu en az {0} olabilir", maxLengthText: "Girilen verinin uzunluðu en fazla {0} olabilir", blankText: "Bu alan boþŸ býrakýlamaz", regexText: "", emptyText: null }); Ext.define("Ext.locale.tr.form.field.Number", { override: "Ext.form.field.Number", minText: "En az {0} girilebilir", maxText: "En çok {0} girilebilir", nanText: "{0} geçersiz bir sayýdýr" }); Ext.define("Ext.locale.tr.form.field.Date", { override: "Ext.form.field.Date", disabledDaysText: "Disabled", disabledDatesText: "Disabled", minText: "Bu tarih, {0} tarihinden daha sonra olmalýdýr", maxText: "Bu tarih, {0} tarihinden daha önce olmalýdýr", invalidText: "{0} geçersiz bir tarihdir - tarih formatý {1} þŸeklinde olmalýdýr", format: "d/m/Y", altFormats: "d.m.y|d.m.Y|d/m/y|d-m-Y|d-m-y|d.m|d/m|d-m|dm|dmY|dmy|d|Y.m.d|Y-m-d|Y/m/d" }); Ext.define("Ext.locale.tr.form.field.ComboBox", { override: "Ext.form.field.ComboBox", valueNotFoundText: undefined }, function() { Ext.apply(Ext.form.field.ComboBox.prototype.defaultListConfig, { loadingText: "Yükleniyor ..." }); }); if (exists('Ext.form.field.VTypes')) { Ext.form.field.VTypes["emailText"] = 'Bu alan "user@example.com" þŸeklinde elektronik posta formatýnda olmalýdýr'; Ext.form.field.VTypes["urlText"] = 'Bu alan "http://www.example.com" þŸeklinde URL adres formatýnda olmalýdýr'; Ext.form.field.VTypes["alphaText"] = 'Bu alan sadece harf ve _ içermeli'; Ext.form.field.VTypes["alphanumText"] = 'Bu alan sadece harf, sayý ve _ içermeli'; } Ext.define("Ext.locale.tr.form.field.HtmlEditor", { override: "Ext.form.field.HtmlEditor", createLinkText: 'Lütfen bu baðlantý için gerekli URL adresini giriniz:' }, function() { Ext.apply(Ext.form.field.HtmlEditor.prototype, { buttonTips: { bold: { title: 'Kalýn(Bold) (Ctrl+B)', text: 'Þžeçili yazýyý kalýn yapar.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, italic: { title: 'İtalik(Italic) (Ctrl+I)', text: 'Þžeçili yazýyý italik yapar.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, underline: { title: 'Alt Çizgi(Underline) (Ctrl+U)', text: 'Þžeçili yazýnýn altýný çizer.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, increasefontsize: { title: 'Fontu büyült', text: 'Yazý fontunu büyütür.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, decreasefontsize: { title: 'Fontu küçült', text: 'Yazý fontunu küçültür.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, backcolor: { title: 'Arka Plan Rengi', text: 'Seçili yazýnýn arka plan rengini deðiþŸtir.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, forecolor: { title: 'Yazý Rengi', text: 'Seçili yazýnýn rengini deðiþŸtir.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, justifyleft: { title: 'Sola Daya', text: 'Yazýyý sola daya.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, justifycenter: { title: 'Ortala', text: 'Yazýyý editörde ortala.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, justifyright: { title: 'Saða daya', text: 'Yazýyý saða daya.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, insertunorderedlist: { title: 'Noktalý Liste', text: 'Noktalý listeye baþŸla.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, insertorderedlist: { title: 'Numaralý Liste', text: 'Numaralý lisyeye baþŸla.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, createlink: { title: 'Web Adresi(Hyperlink)', text: 'Seçili yazýyý web adresi(hyperlink) yap.', cls: Ext.baseCSSPrefix + 'html-editor-tip' }, sourceedit: { title: 'Kaynak kodu Düzenleme', text: 'Kaynak kodu düzenleme moduna geç.', cls: Ext.baseCSSPrefix + 'html-editor-tip' } } }); }); Ext.define("Ext.locale.tr.grid.header.Container", { override: "Ext.grid.header.Container", sortAscText: "Artan sýrada sýrala", sortDescText: "Azalan sýrada sýrala", lockText: "Kolonu kilitle", unlockText: "Kolon kilidini kaldýr", columnsText: "Kolonlar" }); Ext.define("Ext.locale.tr.grid.GroupingFeature", { override: "Ext.grid.GroupingFeature", emptyGroupText: '(Yok)', groupByText: 'Bu Alana Göre Grupla', showGroupsText: 'Gruplar Halinde Göster' }); Ext.define("Ext.locale.tr.grid.PropertyColumnModel", { override: "Ext.grid.PropertyColumnModel", nameText: "Ad", valueText: "Deðer", dateFormat: "d/m/Y" }); });
JavaScript