code
stringlengths
1
2.08M
language
stringclasses
1 value
// DATA_TEMPLATE: js_data oTest.fnStart( "sAjaxSource" ); /* Not interested in ajax source here other than to check it's default */ $(document).ready( function () { /* Check the default */ var oTable = $('#example').dataTable( { "aaData": gaaData } ); var oSettings = oTable.fnSettings(); oTest.fnTest( "Se...
JavaScript
// DATA_TEMPLATE: js_data oTest.fnStart( "oLanguage.sProcessing" ); $(document).ready( function () { /* Check the default */ var oTable = $('#example').dataTable( { "aaData": gaaData, "bProcessing": true } ); var oSettings = oTable.fnSettings(); oTest.fnTest( "Processing language is 'Processing...' by de...
JavaScript
// DATA_TEMPLATE: js_data oTest.fnStart( "oSearch" ); $(document).ready( function () { /* Check the default */ var oTable = $('#example').dataTable( { "aaData": gaaData } ); var oSettings = oTable.fnSettings(); oTest.fnTest( "Default values should be blank", null, function () { var bReturn = oSettin...
JavaScript
// DATA_TEMPLATE: js_data oTest.fnStart( "oLanguage.sZeroRecords" ); $(document).ready( function () { /* Check the default */ var oTable = $('#example').dataTable( { "aaData": gaaData } ); var oSettings = oTable.fnSettings(); oTest.fnTest( "Zero records language is 'No matching records found' by default", ...
JavaScript
// DATA_TEMPLATE: js_data oTest.fnStart( "oLanguage.oPaginate" ); /* Note that the paging language information only has relevence in full numbers */ $(document).ready( function () { /* Check the default */ var oTable = $('#example').dataTable( { "aaData": gaaData, "sPaginationType": "full_numbers" } ); var oS...
JavaScript
// DATA_TEMPLATE: js_data oTest.fnStart( "fnDrawCallback" ); /* Fairly boring function compared to the others! */ $(document).ready( function () { /* Check the default */ var oTable = $('#example').dataTable( { "aaData": gaaData } ); var oSettings = oTable.fnSettings(); var mPass; oTest.fnTest( "Default ...
JavaScript
// DATA_TEMPLATE: js_data oTest.fnStart( "bAutoWidth" ); /* It's actually a little tricky to test this. We can't test absolute numbers because * different browsers and different platforms will render the width of the columns slightly * differently. However, we certainly can test the principle of what should happen (...
JavaScript
// DATA_TEMPLATE: js_data oTest.fnStart( "aoColumns.bUseRendered" ); /* bUseRendered is used to alter sorting data, if false then the original data is used for * sorting rather than the rendered data */ $(document).ready( function () { /* Check the default */ var mTmp = 0; var oTable = $('#example').dataTable(...
JavaScript
// DATA_TEMPLATE: js_data oTest.fnStart( "bLengthChange" ); $(document).ready( function () { /* Check the default */ $('#example').dataTable( { "aaData": gaaData } ); oTest.fnTest( "Length div exists by default", null, function () { return document.getElementById('example_length') != null; } ); oTes...
JavaScript
// DATA_TEMPLATE: js_data oTest.fnStart( "aoColumns.bSortable" ); $(document).ready( function () { /* Check the default */ var oTable = $('#example').dataTable( { "aaData": gaaData } ); var oSettings = oTable.fnSettings(); oTest.fnTest( "All columns are sortable by default", function () { $('#example the...
JavaScript
// DATA_TEMPLATE: js_data oTest.fnStart( "bInfo" ); $(document).ready( function () { /* Check the default */ $('#example').dataTable( { "aaData": gaaData } ); oTest.fnTest( "Info div exists by default", null, function () { return document.getElementById('example_info') != null; } ); /* Check can dis...
JavaScript
// DATA_TEMPLATE: js_data oTest.fnStart( "bSortClasses" ); $(document).ready( function () { /* Check the default */ $('#example').dataTable( { "aaData": gaaData } ); oTest.fnTest( "Sorting classes are applied by default", null, function () { return $('#example tbody tr:eq(0) td:eq(0)').hasClass('sorting...
JavaScript
// DATA_TEMPLATE: js_data oTest.fnStart( "aoColumns.iDataSort" ); $(document).ready( function () { /* Should know that sorting already works by default from other tests, so we can jump * right in here */ var oTable = $('#example').dataTable( { "aaData": gaaData, "aoColumns": [ null, { "iDataSort": 4 },...
JavaScript
// DATA_TEMPLATE: js_data oTest.fnStart( "aoColumns.bSeachable" ); $(document).ready( function () { /* Check the default */ var oTable = $('#example').dataTable( { "aaData": gaaData } ); var oSettings = oTable.fnSettings(); oTest.fnTest( "Columns are searchable by default", function () { oTable.fnFilter(...
JavaScript
// DATA_TEMPLATE: js_data oTest.fnStart( "aoColumns.bVisible" ); $(document).ready( function () { /* Check the default */ var oTable = $('#example').dataTable( { "aaData": gaaData } ); var oSettings = oTable.fnSettings(); oTest.fnTest( "All columns are visible by default", null, function () { return $(...
JavaScript
// DATA_TEMPLATE: js_data oTest.fnStart( "bProcessing" ); /* It's actually a bit hard to set this one due to the fact that it will only be shown * when DataTables is doing some kind of processing. The server-side processing is a bit * better to test this than here - so we just the interal functions to enable it and ...
JavaScript
// DATA_TEMPLATE: js_data oTest.fnStart( "oLanguage.sInfoPostFix" ); $(document).ready( function () { /* Check the default */ var oTable = $('#example').dataTable( { "aaData": gaaData } ); var oSettings = oTable.fnSettings(); oTest.fnTest( "Info post fix language is '' (blank) by default", null, functi...
JavaScript
// DATA_TEMPLATE: js_data oTest.fnStart( "asStripClasses" ); $(document).ready( function () { /* Check the default */ $('#example').dataTable( { "aaData": gaaData } ); oTest.fnTest( "Default row striping is applied", null, function () { return $('#example tbody tr:eq(0)').hasClass('odd') && ...
JavaScript
// DATA_TEMPLATE: js_data oTest.fnStart( "bServerSide" ); /* Not interested in server-side processing here other than to check that it is off */ $(document).ready( function () { /* Check the default */ var oTable = $('#example').dataTable( { "aaData": gaaData } ); var oSettings = oTable.fnSettings(); oTest.f...
JavaScript
// DATA_TEMPLATE: js_data oTest.fnStart( "sDom" ); /* This is going to be brutal on the browser! There is a lot that can be tested here... */ $(document).ready( function () { /* Check the default */ var oTable = $('#example').dataTable( { "aaData": gaaData } ); var oSettings = oTable.fnSettings(); oTest.fnTe...
JavaScript
// DATA_TEMPLATE: js_data oTest.fnStart( "fnHeaderCallback" ); $(document).ready( function () { /* Check the default */ var oTable = $('#example').dataTable( { "aaData": gaaData } ); var oSettings = oTable.fnSettings(); var mPass; oTest.fnTest( "Default should be null", null, function () { return oSet...
JavaScript
// DATA_TEMPLATE: js_data oTest.fnStart( "sPaginationType" ); $(document).ready( function () { /* Check the default */ var oTable = $('#example').dataTable( { "aaData": gaaData } ); var oSettings = oTable.fnSettings(); oTest.fnTest( "Check two button paging is the default", null, function () { return o...
JavaScript
// DATA_TEMPLATE: js_data oTest.fnStart( "oLanguage.sInfoEmpty" ); $(document).ready( function () { /* Check the default */ var oTable = $('#example').dataTable( { "aaData": gaaData } ); var oSettings = oTable.fnSettings(); oTest.fnTest( "Info empty language is 'Showing 0 to 0 of 0 entries' by default", ...
JavaScript
// DATA_TEMPLATE: js_data oTest.fnStart( "oLanguage.sLengthMenu" ); $(document).ready( function () { /* Check the default */ var oTable = $('#example').dataTable( { "aaData": gaaData } ); var oSettings = oTable.fnSettings(); oTest.fnTest( "Menu language is 'Show _MENU_ entries' by default", null, funct...
JavaScript
// DATA_TEMPLATE: js_data oTest.fnStart( "oLanguage.sInfo" ); $(document).ready( function () { /* Check the default */ var oTable = $('#example').dataTable( { "aaData": gaaData } ); var oSettings = oTable.fnSettings(); oTest.fnTest( "Info language is 'Showing _START_ to _END_ of _TOTAL_ entries' by default...
JavaScript
// DATA_TEMPLATE: empty_table oTest.fnStart( "aoColumns.sClass" ); $(document).ready( function () { /* Check the default */ var oTable = $('#example').dataTable( { "bServerSide": true, "sAjaxSource": "../../../examples/examples_support/server_processing.php" } ); var oSettings = oTable.fnSettings(); oTest.f...
JavaScript
// DATA_TEMPLATE: empty_table oTest.fnStart( "aaSorting" ); $(document).ready( function () { /* Check the default */ var oTable = $('#example').dataTable( { "bServerSide": true, "sAjaxSource": "../../../examples/examples_support/server_processing.php" } ); var oSettings = oTable.fnSettings(); oTest.fnWaitTe...
JavaScript
// DATA_TEMPLATE: empty_table oTest.fnStart( "aoSearchCols" ); /* We could be here forever testing this one, so we test a limited subset on a couple of colums */ $(document).ready( function () { /* Check the default */ var oTable = $('#example').dataTable( { "bServerSide": true, "sAjaxSource": "../../../example...
JavaScript
// DATA_TEMPLATE: empty_table oTest.fnStart( "aaSortingFixed" ); $(document).ready( function () { /* Check the default */ var oTable = $('#example').dataTable( { "bServerSide": true, "sAjaxSource": "../../../examples/examples_support/server_processing.php" } ); var oSettings = oTable.fnSettings(); oTest.fnW...
JavaScript
// DATA_TEMPLATE: empty_table oTest.fnStart( "fnInitComplete" ); /* Fairly boring function compared to the others! */ $(document).ready( function () { /* Check the default */ var oTable = $('#example').dataTable( { "bServerSide": true, "sAjaxSource": "../../../examples/examples_support/server_processing.php" }...
JavaScript
// DATA_TEMPLATE: empty_table oTest.fnStart( "aoColumns.fnRender" ); $(document).ready( function () { /* Check the default */ var mTmp = 0; var oTable = $('#example').dataTable( { "bServerSide": true, "sAjaxSource": "../../../examples/examples_support/server_processing.php", "aoColumns": [ null, { "fnRe...
JavaScript
// DATA_TEMPLATE: empty_table oTest.fnStart( "aoColumns.sWidth" ); /* NOTE - we need to disable the auto width for the majority of these test in order to preform * these tests as the auto width will convert the width to a px value. We can do 'non-exact' tests * with auto width enabled however to ensure it scales co...
JavaScript
// DATA_TEMPLATE: empty_table oTest.fnStart( "aoColumns.sName" ); /* This has no effect at all in DOM methods - so we just check that it has applied the name */ $(document).ready( function () { /* Check the default */ var oTable = $('#example').dataTable( { "bServerSide": true, "sAjaxSource": "../../../examples...
JavaScript
// DATA_TEMPLATE: empty_table oTest.fnStart( "fnRowCallback" ); /* Note - fnRowCallback MUST return the first arguments (modified or not) */ $(document).ready( function () { /* Check the default */ var oTable = $('#example').dataTable( { "bServerSide": true, "sAjaxSource": "../../../examples/examples_support/se...
JavaScript
// DATA_TEMPLATE: empty_table oTest.fnStart( "aoColumns.sTitle" ); $(document).ready( function () { /* Check the default */ var oTable = $('#example').dataTable( { "bServerSide": true, "sAjaxSource": "../../../examples/examples_support/server_processing.php" } ); var oSettings = oTable.fnSettings(); oTest.f...
JavaScript
// DATA_TEMPLATE: empty_table oTest.fnStart( "iDisplayLength" ); $(document).ready( function () { /* Check the default */ $('#example').dataTable( { "bServerSide": true, "sAjaxSource": "../../../examples/examples_support/server_processing.php" } ); oTest.fnWaitTest( "Default length is ten", null, func...
JavaScript
// DATA_TEMPLATE: empty_table /* * NOTE: There are some differences in this zero config script for server-side * processing compared to the other data sources. The main reason for this is the * difference in how the server-side processing does it's filtering. Also the * sorting state is always reset on each draw. ...
JavaScript
// DATA_TEMPLATE: empty_table oTest.fnStart( "bFilter" ); $(document).ready( function () { /* Check the default */ $('#example').dataTable( { "bServerSide": true, "sAjaxSource": "../../../examples/examples_support/server_processing.php" } ); oTest.fnWaitTest( "Filtering div exists by default", null, f...
JavaScript
// DATA_TEMPLATE: empty_table /* * NOTE: There are some differences in this zero config script for server-side * processing compared to the other data sources. The main reason for this is the * difference in how the server-side processing does it's filtering. Also the * sorting state is always reset on each draw. ...
JavaScript
// DATA_TEMPLATE: empty_table oTest.fnStart( "oLanguage.sSearch" ); $(document).ready( function () { /* Check the default */ var oTable = $('#example').dataTable( { "bServerSide": true, "sAjaxSource": "../../../examples/examples_support/server_processing.php" } ); var oSettings = oTable.fnSettings(); oTest....
JavaScript
// DATA_TEMPLATE: empty_table oTest.fnStart( "bPaginate" ); $(document).ready( function () { /* Check the default */ $('#example').dataTable( { "bServerSide": true, "sAjaxSource": "../../../examples/examples_support/server_processing.php" } ); oTest.fnWaitTest( "Pagiantion div exists by default", null, ...
JavaScript
// DATA_TEMPLATE: empty_table oTest.fnStart( "oLanguage.sUrl" ); /* Note that we only test the internal storage of language information pulled form a file here * as the other language tests will check it goes into the DOM correctly */ $(document).ready( function () { /* Check the default */ var oTable = $('#examp...
JavaScript
// DATA_TEMPLATE: empty_table oTest.fnStart( "bSort" ); $(document).ready( function () { /* Check the default */ $('#example').dataTable( { "bServerSide": true, "sAjaxSource": "../../../examples/examples_support/server_processing.php" } ); oTest.fnWaitTest( "Sorting is on by default", null, function (...
JavaScript
// DATA_TEMPLATE: empty_table oTest.fnStart( "sAjaxSource" ); /* Sanitfy check really - all the other tests blast this */ $(document).ready( function () { /* Check the default */ var oTable = $('#example').dataTable( { "bServerSide": true, "sAjaxSource": "../../../examples/examples_support/server_processing.php...
JavaScript
// DATA_TEMPLATE: empty_table oTest.fnStart( "oLanguage.sProcessing" ); $(document).ready( function () { /* Check the default */ var oTable = $('#example').dataTable( { "bServerSide": true, "sAjaxSource": "../../../examples/examples_support/server_processing.php", "bProcessing": true } ); var oSettings = oTa...
JavaScript
// DATA_TEMPLATE: empty_table oTest.fnStart( "iDraw - check that iDraw increments for each draw" ); $(document).ready( function () { var oTable = $('#example').dataTable( { "bServerSide": true, "sAjaxSource": "../../../examples/examples_support/server_processing.php" } ); var oSettings = oTable.fnSettings(); ...
JavaScript
// DATA_TEMPLATE: empty_table oTest.fnStart( "oSearch" ); /* Note with my server-side scripts the regex option has no effect - this just runs that down */ $(document).ready( function () { /* Check the default */ var oTable = $('#example').dataTable( { "bServerSide": true, "sAjaxSource": "../../../examples/examp...
JavaScript
// DATA_TEMPLATE: empty_table oTest.fnStart( "2600 - Display rewind when changing length" ); $(document).ready( function () { $('#example').dataTable( { "bServerSide": true, "sAjaxSource": "../../../examples/examples_support/server_processing.php" } ); oTest.fnWaitTest( "Info correct on init", null, fu...
JavaScript
// DATA_TEMPLATE: empty_table oTest.fnStart( "oLanguage.sZeroRecords" ); $(document).ready( function () { /* Check the default */ var oTable = $('#example').dataTable( { "bServerSide": true, "sAjaxSource": "../../../examples/examples_support/server_processing.php" } ); var oSettings = oTable.fnSettings(); o...
JavaScript
// DATA_TEMPLATE: empty_table oTest.fnStart( "oLanguage.oPaginate" ); /* Note that the paging language information only has relevence in full numbers */ $(document).ready( function () { /* Check the default */ var oTable = $('#example').dataTable( { "bServerSide": true, "sAjaxSource": "../../../examples/example...
JavaScript
// DATA_TEMPLATE: empty_table oTest.fnStart( "fnDrawCallback" ); /* Fairly boring function compared to the others! */ $(document).ready( function () { /* Check the default */ var oTable = $('#example').dataTable( { "bServerSide": true, "sAjaxSource": "../../../examples/examples_support/server_processing.php" }...
JavaScript
// DATA_TEMPLATE: empty_table oTest.fnStart( "bAutoWidth" ); /* It's actually a little tricky to test this. We can't test absolute numbers because * different browsers and different platforms will render the width of the columns slightly * differently. However, we certainly can test the principle of what should happ...
JavaScript
// DATA_TEMPLATE: empty_table oTest.fnStart( "aoColumns.bUseRendered" ); /* bUseRendered is used to alter sorting data, if false then the original data is used for * sorting rather than the rendered data */ $(document).ready( function () { /* Check the default */ var mTmp = 0; var oTable = $('#example').dataTa...
JavaScript
// DATA_TEMPLATE: empty_table oTest.fnStart( "bLengthChange" ); $(document).ready( function () { /* Check the default */ $('#example').dataTable( { "bServerSide": true, "sAjaxSource": "../../../examples/examples_support/server_processing.php" } ); oTest.fnWaitTest( "Length div exists by default", null, ...
JavaScript
// DATA_TEMPLATE: empty_table oTest.fnStart( "aoColumns.bSortable" ); $(document).ready( function () { /* Check the default */ var oTable = $('#example').dataTable( { "bServerSide": true, "sAjaxSource": "../../../examples/examples_support/server_processing.php" } ); var oSettings = oTable.fnSettings(); oTes...
JavaScript
// DATA_TEMPLATE: empty_table oTest.fnStart( "Destroy with hidden columns" ); $(document).ready( function () { var mTest; $('#example').dataTable( { "bServerSide": true, "sAjaxSource": "../../../examples/examples_support/server_processing.php", "aoColumnDefs": [ { "bSearchable": false, "bVisible": fals...
JavaScript
// DATA_TEMPLATE: empty_table oTest.fnStart( "bInfo" ); $(document).ready( function () { /* Check the default */ $('#example').dataTable( { "bServerSide": true, "sAjaxSource": "../../../examples/examples_support/server_processing.php" } ); oTest.fnWaitTest( "Info div exists by default", null, function...
JavaScript
// DATA_TEMPLATE: empty_table oTest.fnStart( "bSortClasses" ); $(document).ready( function () { /* Check the default */ $('#example').dataTable( { "bServerSide": true, "sAjaxSource": "../../../examples/examples_support/server_processing.php" } ); oTest.fnWaitTest( "Sorting classes are applied by default",...
JavaScript
// DATA_TEMPLATE: empty_table oTest.fnStart( "bInfiniteScroll" ); $(document).ready( function () { var oTable = $('#example').dataTable( { "bScrollInfinite": true, "sScrollY": "200px", "bServerSide": true, "sAjaxSource": "../../../examples/examples_support/server_processing.php" } ); oTest.fnWaitTest( ...
JavaScript
// DATA_TEMPLATE: empty_table oTest.fnStart( "aoColumns.bSeachable" ); $(document).ready( function () { /* Check the default */ var oTable = $('#example').dataTable( { "bServerSide": true, "sAjaxSource": "../../../examples/examples_support/server_processing.php" } ); var oSettings = oTable.fnSettings(); oTe...
JavaScript
// DATA_TEMPLATE: empty_table oTest.fnStart( "aoColumns.bVisible" ); $(document).ready( function () { /* Check the default */ var oTable = $('#example').dataTable( { "bServerSide": true, "sAjaxSource": "../../../examples/examples_support/server_processing.php" } ); var oSettings = oTable.fnSettings(); oTest...
JavaScript
// DATA_TEMPLATE: empty_table oTest.fnStart( "bProcessing" ); /* It's actually a bit hard to set this one due to the fact that it will only be shown * when DataTables is doing some kind of processing. The server-side processing is a bit * better to test this than here - so we just the interal functions to enable it ...
JavaScript
// DATA_TEMPLATE: empty_table oTest.fnStart( "oLanguage.sInfoPostFix" ); $(document).ready( function () { /* Check the default */ var oTable = $('#example').dataTable( { "bServerSide": true, "sAjaxSource": "../../../examples/examples_support/server_processing.php" } ); var oSettings = oTable.fnSettings(); o...
JavaScript
// DATA_TEMPLATE: empty_table oTest.fnStart( "asStripClasses" ); $(document).ready( function () { /* Check the default */ $('#example').dataTable( { "bServerSide": true, "sAjaxSource": "../../../examples/examples_support/server_processing.php" } ); oTest.fnWaitTest( "Default row striping is applied", nu...
JavaScript
// DATA_TEMPLATE: empty_table oTest.fnStart( "bServerSide" ); /* All the other scripts blast the ssp processing */ $(document).ready( function () { /* Check the default */ var oTable = $('#example').dataTable( { "bServerSide": true, "sAjaxSource": "../../../examples/examples_support/server_processing.php" } );...
JavaScript
// DATA_TEMPLATE: empty_table oTest.fnStart( "sDom" ); /* This is going to be brutal on the browser! There is a lot that can be tested here... */ $(document).ready( function () { /* Check the default */ var oTable = $('#example').dataTable( { "bServerSide": true, "sAjaxSource": "../../../examples/examples_suppo...
JavaScript
// DATA_TEMPLATE: empty_table oTest.fnStart( "fnHeaderCallback" ); $(document).ready( function () { /* Check the default */ var oTable = $('#example').dataTable( { "bServerSide": true, "sAjaxSource": "../../../examples/examples_support/server_processing.php" } ); var oSettings = oTable.fnSettings(); var mPass...
JavaScript
// DATA_TEMPLATE: empty_table oTest.fnStart( "sPaginationType" ); $(document).ready( function () { /* Check the default */ var oTable = $('#example').dataTable( { "bServerSide": true, "sAjaxSource": "../../../examples/examples_support/server_processing.php" } ); var oSettings = oTable.fnSettings(); oTest.fn...
JavaScript
// DATA_TEMPLATE: empty_table oTest.fnStart( "oLanguage.sInfoEmpty" ); $(document).ready( function () { /* Check the default */ var oTable = $('#example').dataTable( { "bServerSide": true, "sAjaxSource": "../../../examples/examples_support/server_processing.php" } ); var oSettings = oTable.fnSettings(); oTe...
JavaScript
// DATA_TEMPLATE: empty_table oTest.fnStart( "oLanguage.sLengthMenu" ); $(document).ready( function () { /* Check the default */ var oTable = $('#example').dataTable( { "bServerSide": true, "sAjaxSource": "../../../examples/examples_support/server_processing.php" } ); var oSettings = oTable.fnSettings(); oT...
JavaScript
// DATA_TEMPLATE: empty_table oTest.fnStart( "oLanguage.sInfo" ); $(document).ready( function () { /* Check the default */ var oTable = $('#example').dataTable( { "bServerSide": true, "sAjaxSource": "../../../examples/examples_support/server_processing.php" } ); var oSettings = oTable.fnSettings(); oTest.fn...
JavaScript
/* * File: ColReorder.js * Version: 1.0.1 * CVS: $Id$ * Description: Controls for column visiblity in DataTables * Author: Allan Jardine (www.sprymedia.co.uk) * Created: Wed Sep 15 18:23:29 BST 2010 * Modified: $Date$ by $Author$ * Language: Javascript * License: LGPL * P...
JavaScript
/* * File: KeyTable.js * Version: 1.1.6 * CVS: $Idj$ * Description: Keyboard navigation for HTML tables * Author: Allan Jardine (www.sprymedia.co.uk) * Created: Fri Mar 13 21:24:02 GMT 2009 * Modified: $Date$ by $Author$ * Language: Javascript * License: GPL v2 or BSD 3 po...
JavaScript
/* * File: FixedColumns.js * Version: 1.1.0 * Description: "Fix" columns on the left of a scrolling DataTable * Author: Allan Jardine (www.sprymedia.co.uk) * Created: Sat Sep 18 09:28:54 BST 2010 * Language: Javascript * License: GPL v2 or BSD 3 point style * Project: Just a littl...
JavaScript
/* * File: TableTools.js * Version: 2.0.1 * Description: Tools and buttons for DataTables * Author: Allan Jardine (www.sprymedia.co.uk) * Language: Javascript * License: LGPL / 3 point BSD * Project: DataTables * * Copyright 2009-2011 Allan Jardine, all rights reserved. */ /* Glob...
JavaScript
// Simple Set Clipboard System // Author: Joseph Huckaby var ZeroClipboard = { version: "1.0.4-TableTools2", clients: {}, // registered upload clients on page, indexed by id moviePath: '', // URL to movie nextId: 1, // ID of next movie $: function(thingy) { // simple DOM lookup utility function if (typeof...
JavaScript
/* * File: ColVis.js * Version: 1.0.4 * CVS: $Id$ * Description: Controls for column visiblity in DataTables * Author: Allan Jardine (www.sprymedia.co.uk) * Created: Wed Sep 15 18:23:29 BST 2010 * Modified: $Date$ by $Author$ * Language: Javascript * License: LGPL * Proje...
JavaScript
/* * File: AutoFill.js * Version: 1.1.1 * CVS: $Id$ * Description: AutoFill for DataTables * Author: Allan Jardine (www.sprymedia.co.uk) * Created: Mon 6 Sep 2010 16:54:41 BST * Modified: $Date$ by $Author$ * Language: Javascript * License: GPL v2 or BSD 3 point * Projec...
JavaScript
/* * File: FixedHeader.js * Version: 2.0.4 * Description: "Fix" a header at the top of the table, so it scrolls with the table * Author: Allan Jardine (www.sprymedia.co.uk) * Created: Wed 16 Sep 2009 19:46:30 BST * Language: Javascript * License: LGPL * Project: Just a little bit ...
JavaScript
function postFormSave(formNode, postOptions, callback){ postOptions.createFilename = $('.eFilename').val(); $('.dialog-metadata').dialog("close"); $('.infoMessage span').html("Please wait..."); $('.infoMessage').removeClass("good").center(); $('.infoMessage').fadeIn(300).center(); formNode.form("save"...
JavaScript
function goAspect(){ window.location = "?aspect=" + $('.aspect-fm').val() + "&node=" + $('.document-fm').val(); } $(function(){ $('.jfk-button').mouseenter(function(){ $(this).addClass('jfk-button-hover'); }).mouseleave(function(){ $(this).removeClass('jfk-button-hover'); }); $('.aspect-fm').bind(...
JavaScript
<import resource="classpath:/alfresco/site-webscripts/org/alfresco/components/documentlibrary/data/surf-doclist.lib.js"> var this_AlfrescoUtil = this; var AlfrescoUtil = { /** * * NOTE DEPRECATED! This method was previously used to dynamically change the region-id's in the template. * Use evaluators to...
JavaScript
var siteid = page.url.templateArgs.site; var repoSearch = "false"; var allSiteSearch = "true"; function doSiteStuff() { //Get site information var siteString = remote.call("/api/sites/" + siteid); siteJsonObj = eval( "(" + siteString + ")" ); model.site = siteJsonObj; model.isAdvSearchProfile = fal...
JavaScript
var connector = remote.connect("alfresco"); model.result = connector.post("/form-management/search/csvdata/save", args.mypost);
JavaScript
var params = []; var isDebug = false; //MANDATORY VARIABLES params["storeObj"] = encodeURIComponent( args["storeObj"] ); params["aspects"] = encodeURIComponent( args["aspects"] ); params["nodeId"] = encodeURIComponent( args["nodeId"] ); params["moveId"] = encodeURIComponent( args["moveId"] ); // DEBUG...
JavaScript
model.siteid = page.url.templateArgs.site; model.fmNode = ""; if(page.url.args.aspect){ var result = remote.call("/model/aspects/aspecttoproperty?aspects=" + page.url.args.aspect); model.fmAspects = result + ""; }else{ model.fmAspects = ''; } model.test = page.url.args.aspect;
JavaScript
/* Copyright (c) 2008, Bubbling Library Team. All rights reserved. Portions Copyright (c) 2008, Yahoo!, Inc. All rights reserved. Code licensed under the BSD License: http://www.bubbling-library.com/eng/licence version: 2.1 */ (function() { var $B = YAHOO.Bubbling, $L = YAHOO.lang, $E = YAHOO.util.Event,...
JavaScript
var results = {}; var result= new Array(); var resource = ""+url.extension; var query = args.q; var status = "succeed"; switch (resource){ case "google": var googleServiceUrl = "http://google.com/complete/search?output=toolbar&q="+query; var connector = remote.connect("http"); var s...
JavaScript
var result = new Array(); var carMake = url.extension; var dataServiceUrl = "http://localhost:8080/share/components/form/samples/cars.xml"; var connector = remote.connect("http"); var str = new String(connector.call(dataServiceUrl)); //Javascript E4X module has problems with XML header if ( str.substr...
JavaScript
/* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the "License"); you may not use...
JavaScript
var audio = new Audio(); // Create an <audio> tag // Create the play/pause and stop buttons function init(){ var playing = true; // Get the play/pause button element and append the audio play/pause method to onclick var playtoggle = document.getElementById('playtoggle'); playtoggle.addEventListener('click', f...
JavaScript
node = ""; var nodeRef = new Array(); nodeRef[0] = url.templateArgs.store_type; nodeRef[1] = url.templateArgs.store_id; nodeRef[2] = url.templateArgs.id; var error = false; //functions //Main // Check the URI parameters that were supposed to be passed if (nodeRef[0] == undefined || nodeRef[0].length ==...
JavaScript
// functions function get(location) { uri = "http://maps.google.com/maps/geo?q="+encodeURI(location)+"&sensor=false&output=json" var connector = remote.connect("http"); var result = connector.call(uri); return eval("("+result+")"); } function getLatLong(json){ var latlong = new Array(); latlo...
JavaScript
var location = url.templateArgs.location; //Main if (location == undefined || location.length == 0) { status.code = 400; status.message = "No location provided"; status.redirect = true; } else { uri = "http://maps.google.com/maps/geo?q="+encodeURI(location)+"&sensor=false&output=json" var connector = ...
JavaScript
model.library = search.findNode("workspace://SpacesStore/" + url.extension); if (model.library == undefined) { status.code = 500; status.message = "Library " + url.extension + " does not exist."; status.redirect = true; }
JavaScript
script: { var appId = "FB" + facebook.appId; var appFolder = companyhome.childByNamePath(appId); if (appFolder == undefined) { status.code = 500; status.message = "The Alfresco Repository has not been setup for this application (missing folder \"" + companyhome.name + "/" + appId + "\"). Contact Adminis...
JavaScript
script: { var appId = "FB" + facebook.appId; var appFolder = companyhome.childByNamePath(appId); if (appFolder == undefined) { status.code = 500; status.message = "The Alfresco Repository has not been setup for this application (missing folder \"" + companyhome.name + "/" + appId + "\"). Contact Adminis...
JavaScript
script: { var appId = "FB" + facebook.appId; var appFolder = companyhome.childByNamePath(appId); if (appFolder == undefined) { status.code = 500; status.message = "The Alfresco Repository has not been setup for this application (missing folder \"" + companyhome.name + "/" + appId + "\"). Contact Adminis...
JavaScript
model.library = search.findNode("workspace://SpacesStore/" + url.extension);
JavaScript
model.library = search.findNode("workspace://SpacesStore/" + url.extension); // locate file attributes var filename = null; var content = null; var mimetype = null; for each (field in formdata.fields) { if (field.name == "file" && field.isFile) { filename = field.filename; content = field.content; mim...
JavaScript