code
stringlengths
1
2.08M
language
stringclasses
1 value
CodeMirror.defineMode("vb", function(conf, parserConf) { var ERRORCLASS = 'error'; function wordRegexp(words) { return new RegExp("^((" + words.join(")|(") + "))\\b", "i"); } var singleOperators = new RegExp("^[\\+\\-\\*/%&\\\\|\\^~<>!]"); var singleDelimiters = new RegExp('^[\\(\\...
JavaScript
CodeMirror.defineMode("xml", function(config, parserConfig) { var indentUnit = config.indentUnit; var Kludges = parserConfig.htmlMode ? { autoSelfClosers: {'area': true, 'base': true, 'br': true, 'col': true, 'command': true, 'embed': true, 'frame': true, 'hr': true, 'img': true, 'input': ...
JavaScript
 Umbraco.Sys.registerNamespace("Umbraco.Controls"); (function ($, Base, window, document, undefined) { var itemMappingOptions = { 'create': function (o) { var item = ko.mapping.fromJS(o.data); item.selected = ko.observable(false); item.toggleSelected = functio...
JavaScript
/* base2 - copyright 2007-2011, Dean Edwards http://code.google.com/p/base2/ http://www.opensource.org/licenses/mit-license.php Contributors: Doeke Zanstra */ var base2 = { name: "base2", version: "1.0.2", exports: "Base,Package,Abstract,Module,Enumerable,Map,Collection,RegGrp," + "Undefi...
JavaScript
// MSDropDown - uncompressed.jquery.dd // author: Marghoob Suleman - Search me on google // Date: 12th Aug, 2009 // Version: 2.38.4 // Revision: 38 // web: www.giftlelo.com | www.marghoobsuleman.com /* // msDropDown is free jQuery Plugin: you can redistribute it and/or modify // it under the terms of the eithe...
JavaScript
// // This File contains all standard javascript helpers for normal umbraco pages, // for resizing, event handling etc. // All UI controls should expect this js file to be present. // included in umbracoPage.master // function addEvent(obj, evType, fn) { if (obj.addEventListener) { ...
JavaScript
// // =============================================================================== // WResize is the jQuery plugin for fixing the IE window resize bug // ............................................................................... // Copyright 2007 / Andrea Ercolino // -------------------------------...
JavaScript
(function ($) { $.fn.alphanumeric = function (p) { p = $.extend({ ichars: "!@#$%^&*()+=[]\\\';,/{}|\":<>?~`.- ", nchars: "", allow: "" }, p); return this.each ( function () { if (p.nocaps) p.nchars += "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; if (p.allcaps) p.nchars += "abcdefghijk...
JavaScript
function actionNewRelationType() { UmbClientMgr.openModalWindow('developer/RelationTypes/NewRelationType.aspx', 'Create New RelationType', true, 400, 300, 0, 0); }
JavaScript
function actionDeleteRelationType(relationTypeId, relationTypeName) { if (confirm('Are you sure you want to delete "' + relationTypeName + '"?')) { $.ajax({ type: "POST", url: "/umbraco/developer/RelationTypes/RelationTypesWebService.asmx/DeleteRelationType", data...
JavaScript
/*! * jQuery Templates Plugin 1.0.0pre * http://github.com/jquery/jquery-tmpl * Requires jQuery 1.4.2 * * Copyright Software Freedom Conservancy, Inc. * Dual licensed under the MIT or GPL Version 2 licenses. * http://jquery.org/license */ (function( jQuery, undefined ){ var oldManip = jQuery.fn.domMa...
JavaScript
var Our = Our || {}; Our.Umbraco = Our.Umbraco || {}; Our.Umbraco.uGoLive = Our.Umbraco.uGoLive || {}; (function ($) { // Class representing a check group Our.Umbraco.uGoLive.CheckGroup = function(name, checks, opts) { var me = { name: name, checks: ko.observableArra...
JavaScript
/// <reference path="/umbraco_client/Application/NamespaceManager.js" /> Umbraco.Sys.registerNamespace("Umbraco.Controls"); (function($) { Umbraco.Controls.UploadMediaImage = function(txtBoxTitleID, btnID, uploadFileID) { return { _txtBoxTitleID: txtBoxTitleID, _btnID: btn...
JavaScript
/// <reference path="/umbraco_client/Application/NamespaceManager.js" /> /// <reference path="/umbraco_client/ui/jquery.js" /> Umbraco.Sys.registerNamespace("Umbraco.Controls"); (function($) { //jQuery plugin for Umbraco image viewer control $.fn.UmbracoImageViewer = function(opts) { //all op...
JavaScript
(function ($) { $.fn.UmbQuickSearch = function (url) { var getSearchApp = function () { if (UmbClientMgr.mainWindow().location.hash != "") { switch (UmbClientMgr.mainWindow().location.hash.toLowerCase().substring(1).toLowerCase()) { case "media": ...
JavaScript
var requestRunning = false; var xmlHttp = null; var xmlHttpDebug = false; // Inspired by great work of Webfx in xloadtree function umbracoStartXmlRequest(scriptUrl, postData, eventFunction) { // random hack for ie7 day = new Date(); z = day.getTime(); y = (z - (parseInt(z/1000,10) * 1000))/10; scriptU...
JavaScript
function dualSelectBoxShift(id) { var posVal = document.getElementById(id + "_posVals"); var selVal = document.getElementById(id + "_selVals"); // First check the possible items for (var i=0;i<posVal.options.length;i++) { if (posVal.options[i].selected) { var selNew = document.createElement(...
JavaScript
var ctrlDown = false; var shiftDown = false; var keycode = 0 var currentRichTextDocument = null; var currentRichTextObject = null; function umbracoCheckKeysUp(e) { ctrlDown = e.ctrlKey; shiftDown = e.shiftKey; } function umbracoActivateKeys(ctrl, shift, key) { ctrlDown = ctrl; shiftDown = shift; ...
JavaScript
function umbracoCheckUpgrade(result) { if (result) { if (result.UpgradeType.toLowerCase() != 'none') { if (UmbSpeechBubble == null) { InitUmbracoSpeechBubble(); } var icon = 'info'; if (result.UpgradeType.toLowerCase() == 'critical') { ...
JavaScript
//<script> ////////////////// // Helper Stuff // ////////////////// function HTMLEncode(t) { return t.toString().replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/</g,"&lt;").replace(/>/g,"&gt;"); } // used to find the Automation server name function getDomDocumentPrefix() { if (getDomDocumentPref...
JavaScript
//used by live editing to ensure the speech bubble is initialized after the main js file has been lazy loaded. //alert("Speech Bubble init: " + InitUmbracoSpeechBubble); InitUmbracoSpeechBubble();
JavaScript
// Umbraco SpeechBubble Javascript // Dependency Loader Constructor function UmbracoSpeechBubble(id) { this.id = id; this.ie = document.all ? true : false; this.GenerateSpeechBubble(); } UmbracoSpeechBubble.prototype.GenerateSpeechBubble = function() { var sbHtml = document.getElementBy...
JavaScript
// Umbraco SpeechBubble Javascript // Dependency Loader Constructor function UmbracoSpeechBubble(id) { this.id = id; this.ie = document.all ? true : false; this.GenerateSpeechBubble(); } UmbracoSpeechBubble.prototype.GenerateSpeechBubble = function() { theBody = document.getElementsByTa...
JavaScript
/// <reference path="/umbraco_client/Application/NamespaceManager.js" /> /// <reference path="/umbraco_client/ui/jquery.js" /> /// <reference path="PermissionsHandler.asmx" /> /// <reference name="MicrosoftAjax.js"/> Umbraco.Sys.registerNamespace("Umbraco.Controls"); (function($) { $.fn.PermissionsEditor...
JavaScript
/********************* Live Editing MacroModule functions *********************/ function MacroOnDrop( sender, e ) { var container = e.get_container(); var item = e.get_droppedItem(); var position = e.get_position(); //alert( String.format( "Container: {0}, Item: {1}, Position: {2}", container.id, item.i...
JavaScript
// Umbraco Live Editing - ItemEditing: Item Editing var ItemEditing = null; Type.registerNamespace("umbraco.presentation.LiveEditing"); /************************ ItemEditing class ************************/ // Creates a new instance of the ItemEditing class. umbraco.presentation.LiveEditing.ItemEditing = fun...
JavaScript
//this is simply used for live editing in order to invoke a method from a previously lazy loaded script; //alert("ItemEditingInvoke: " + initializeGlobalItemEditing); initializeGlobalItemEditing();
JavaScript
/********************* Live Editing CreateModule functions *********************/ function CreateModuleOk() { UmbracoCommunicator.SendClientMessage('createcontent', ''); }
JavaScript
/********************* Live Editing UnpublishModule functions *********************/ function UnpublishModuleOk() { UmbracoCommunicator.SendClientMessage('unpublishcontent', ''); }
JavaScript
/********************* Live Editing DeleteModule functions *********************/ function DeleteModuleOk() { UmbracoCommunicator.SendClientMessage('deletecontent', ''); }
JavaScript
ShowSkinModule();
JavaScript
jQuery(".skinningslider").each(function () { var vals = jQuery(this).attr("rel").split(","); var minimum = vals[0]; var maximum = vals[1]; var initial = vals[2]; var ratio = vals[3] var target = vals[4]; jQuery(this).slider({ change: function (event, ui) { if (ratio !=...
JavaScript
var activecolorpicker; jQuery('input.skinningcolorpicker').ColorPicker({ onSubmit: function (hsb, hex, rgb, el) { jQuery(el).val('#' + hex); jQuery(el).ColorPickerHide(); jQuery(el).trigger('change'); }, onBeforeShow: function () { activecolorpicker = this; ...
JavaScript
jQuery('.selectskin').click(function () { jQuery('#skinupdateinprogress').show(); jQuery('#skins').hide(); jQuery('#localSkinsContainer').hide(); });
JavaScript
var umbModuleToInsertAlias; function umbMakeModulesSortable() { if (jQuery('.umbModuleContainer').length > 0) { jQuery('.umbModuleContainer').sortable({ connectWith: '.umbModuleContainer', items: '.umbModule', stop: function (event, ui) { U...
JavaScript
// Umbraco Live Editing: Communicator /********************* Communicator Constructor *********************/ function UmbracoCommunicator() { } /********************* Communicator Methods *********************/ // Sends a message to the client using the communicator. UmbracoCommunicator.pr...
JavaScript
Type.registerNamespace("umbraco.presentation.LiveEditing.Controls"); /************************************ Toolbar class ***********************************/ // Constructor. umbraco.presentation.LiveEditing.Controls.LiveEditingToolbar = function() { umbraco.presentation.LiveEditing.Controls.LiveEditingTool...
JavaScript
// ajax.js // Common Javascript methods and global objects // Ajax framework for Internet Explorer (6.0, ...) and Firefox (1.0, ...) // Copyright by Matthias Hertel, http://www.mathertel.de // This work is licensed under a Creative Commons Attribution 2.0 Germany License. // See http://creativecommons.org/licenses...
JavaScript
/** * dat.globe Javascript WebGL Globe Toolkit * http://dataarts.github.com/dat.globe * * Copyright 2011 Data Arts Team, Google Creative Lab * * 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 Licen...
JavaScript
function removeHtmlTag(strx,chop){ 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); } } s = s.join(""); s = s.substring(0,chop-1); return s; } function showrecentposts(json) { j = (showRandomImg) ? Math.floor((imgr....
JavaScript
var tooltipID='osdhtmltooltip'; var imgtipID='osdhtmlpointer'; document.write('<div id="'+tooltipID+'" style="VISIBILITY: hidden;"></div>'); document.write('<img id="'+imgtipID+'" style="VISIBILITY: hidden;" src="http://3.bp.blogspot.com/-isVgNnH7yTY/UQPVmmaPPBI/AAAAAAAAKIE/1DfWDRmdGvw/s1600/tooltiparrowtrollvl.gif">')...
JavaScript
/* * Copyright (c) 2011 Google Inc. * * 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 writin...
JavaScript
/* * Copyright (c) 2011 Google Inc. * * 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 ...
JavaScript
/* * Copyright (c) 2011 Google Inc. * * 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 ...
JavaScript
/* html5slider - a JS implementation of <input type=range> for Firefox 4 and up https://github.com/fryn/html5slider Copyright (c) 2010-2011 Frank Yan, <http://frankyan.com> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software")...
JavaScript
// Keep track of some UI elements var overlayControls = document.getElementById('overlayControls'); var scaleTxt = document.getElementById('scaleTxt'); var offsetTxt = document.getElementById('offsetTxt'); // Track our overlays for re-use later var overlays = []; // Scale limits---tiny hats look silly, but tiny monoc...
JavaScript
// Place your application-specific JavaScript functions and classes here // This file is automatically included by javascript_include_tag :defaults
JavaScript
// Place your application-specific JavaScript functions and classes here // This file is automatically included by javascript_include_tag :defaults
JavaScript
// Place your application-specific JavaScript functions and classes here // This file is automatically included by javascript_include_tag :defaults
JavaScript
javascript:(function () { adsweep(); var version = '2.0.3'; function adsweep(){ if(location.href){ window.adsweepVersion=version; window.ua=navigator.userAgent; window.URL = location.href; var countTries=0; function checkDOM(){ if(countTries<120){ if(document.getElementsByTagName("...
JavaScript
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www."); document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
JavaScript
try { var pageTracker = _gat._getTracker("UA-18761191-1"); pageTracker._trackPageview(); } catch(err) {}
JavaScript
/*! * jQuery JavaScript Library v2.1.3 * http://jquery.com/ * * Includes Sizzle.js * http://sizzlejs.com/ * * Copyright 2005, 2014 jQuery Foundation, Inc. and other contributors * Released under the MIT license * http://jquery.org/license * * Date: 2014-12-18T15:11Z */ (function( global, fact...
JavaScript
eventApp.factory('eventFactory', ['$q', '$http', function($q, $http) { return { getEventInformation: function(eventId) { var baseUrl = 'http://localhost:8080/attendance-api-0.0.1-SNAPSHOT/event/' + eventId; // Typically, when using promises you see something like promise1().then(pro...
JavaScript
var eventApp = angular.module('EventApp', ['ngAnimate']);
JavaScript
eventApp.controller('EventController', ['$scope', '$http', '$timeout', 'eventFactory', '$filter', '$timeout','$window', function ($scope, $http, $timeout, eventFactory, $filter, $timeout,$window) { $scope.cmsContacts = []; var winObject={}; initGoogleCalendar = function () { //You can also use this...
JavaScript
// Copyright 2012 Google Inc. All Rights Reserved. // // 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...
JavaScript
// Copyright 2012 Google Inc. All Rights Reserved. // // 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...
JavaScript
// Copyright 2012 Google Inc. All Rights Reserved. // // 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...
JavaScript
// Copyright 2012 Google Inc. All Rights Reserved. // // 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...
JavaScript
// Copyright 2012 Google Inc. All Rights Reserved. // // 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...
JavaScript
// Copyright 2012 Google Inc. All Rights Reserved. // // 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...
JavaScript
// Copyright 2012 Google Inc. All Rights Reserved. // // 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...
JavaScript
// Copyright 2012 Google Inc. All Rights Reserved. // // 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...
JavaScript
// Copyright 2012 Google Inc. All Rights Reserved. // // 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...
JavaScript
// Copyright 2012 Google Inc. All Rights Reserved. // // 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...
JavaScript
// Copyright 2012 Google Inc. All Rights Reserved. // // 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...
JavaScript
// Copyright 2012 Google Inc. All Rights Reserved. // // 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...
JavaScript
// Copyright 2012 Google Inc. All Rights Reserved. // // 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...
JavaScript
// Copyright 2012 Google Inc. All Rights Reserved. // // 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...
JavaScript
// Copyright 2012 Google Inc. All Rights Reserved. // // 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...
JavaScript
/* * JSON-RPC JavaScript client * * $Id: jsonrpc.js,v 1.40 2006/03/08 15:09:24 mclark Exp $ * * Copyright (c) 2003-2004 Jan-Klaas Kollhof * Copyright (c) 2005 Michael Clark, Metaparadigm Pte Ltd * * This code is based on Jan-Klaas' JavaScript o lait library (jsolait). * * Licensed under the Apache License, Ve...
JavaScript
function sprintf( ) { // Return a formatted string // // version: 903.3016 // discuss at: http://phpjs.org/functions/sprintf // + original by: Ash Searle (http://hexmen.com/blog/) // + namespaced by: Michael White (http://getsprink.com) // + tweaked by: Jack // + improved by:...
JavaScript
/** * * Base64 encode / decode * http://www.webtoolkit.info/ * **/ var Base64 = { // private property _keyStr : "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=", // public method for encoding encode : function (input) { var output = ""; var chr1, chr2, chr3, enc1, enc2, enc3, enc4; va...
JavaScript
/** * jsPDF * (c) 2009 James Hall * * Some parts based on FPDF. */ var jsPDF = function(){ // Private properties var version = '20090504'; var buffer = ''; var pdfVersion = '1.3'; // PDF Version var defaultPageFormat = 'a4'; var pageFormats = { // Size in mm of various paper formats 'a3': [841.89, 1...
JavaScript
/** * * Color picker * Author: Stefan Petre www.eyecon.ro * * Dual licensed under the MIT and GPL licenses * */ (function ($) { var ColorPicker = function () { var ids = {}, inAction, charMin = 65, visible, tpl = '<div class="colorpicker"><div class="colorpicker_color"><div><di...
JavaScript
function ModalAjaxRequest(page,laodplace,header,titre,data){ $.ajax({ type: "POST", url: page, data: $('#'+data).serialize(),//{form:data}, beforeSend :function(){ $('#'+laodplace).html("<img src='/ayda1/public/resources/img/loading.gif'/>"); }, success: function(response,ev...
JavaScript
/** * Unicorn Admin Template * Diablo9983 -> diablo9983@gmail.com **/ $(document).ready(function(){ // === Sidebar navigation === // $('.submenu > a').click(function(e) { e.preventDefault(); var submenu = $(this).siblings('ul'); var li = $(this).parents('li'); var submenus = $('#sidebar li.submenu u...
JavaScript
/* ANCData - Plugin blogger Author by Suzuki_aka Version 1.0; */ var anc = { max:0,home:"phimtuyenchon.net",post:100, title: new Array(), url: new Array(), label: new Array(), img:{f:new Array(), i72:new Array(),no:"http://2.bp.blogspot.com/-7XkENH-SCdg/UNh_In2PvqI/AAAAAAAABGA/Fp69KOfPjyU/s1600/logo...
JavaScript
//Helps in creating a structure will help later. function makeStruct(names) { var names = names.split(' '); var count = names.length; function constructor() { for (var i = 0; i < count; i++) { this[names[i]] = arguments[i]; } } return constructor; } var rootc...
JavaScript
/* http://www.JSON.org/json2.js 2010-11-17 Public Domain. NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK. See http://www.JSON.org/js.html This code should be minified before deployment. See http://javascript.crockford.com/jsmin.html USE YOUR OWN COPY. IT IS EXTREMELY UNWISE...
JavaScript
var ec2ui_endpointsTreeView = { COLNAMES: ['endpoint.name','endpoint.type','endpoint.url'], treeBox: null, selection: null, endpointlist : new Array(), get rowCount() { return this.endpointlist.length; }, setTree : function(treeBox) { this.treeBox = treeBox; }, ge...
JavaScript
// "Classes" representing objects like AMIs, Instances etc. function Credential(name, accessKey, secretKey, regionPref) { this.name = name; this.accessKey = accessKey; this.secretKey = secretKey; this.regionPref = regionPref; } function AccountIdName(id, name) { this.accountid = id; this.displa...
JavaScript
var ec2_SecurityGroupDetails = { init : function() { var group = window.arguments[0]; document.getElementById("ec2ui.secgroup.name").value = group.name; document.getElementById("ec2ui.secgroup.ownerid").value = group.ownerId; document.getElementById("ec2ui.secgroup.description").valu...
JavaScript
var ec2ui_RegisterInstances = { ec2ui_session : null, retVal : null, loadbalancer : null, launch : function() { this.retVal.LoadBalancerName = document.getElementById("ec2ui.registerlb.LoadBalancerName").value.trim(); var listBox = document.getElementById('Register_Instances'); var idx = 0; v...
JavaScript
// controller: slightly higher level of abstraction over the EC2 API var ec2ui_controller = { getNsResolver : function() { return ec2_httpclient.getNsResolver(); }, registerImageInRegion : function(manifestPath, region, callback) { region = region.toLowerCase(); // Determine the cu...
JavaScript
var ec2_VolumeDetails = { init : function() { var volume = window.arguments[0]; document.getElementById("ec2ui.volume.id").value = volume.id; document.getElementById("ec2ui.volume.size").value = volume.size; document.getElementById("ec2ui.volume.snapshotId").value = volume.snapshotId...
JavaScript
var ec2_InstanceConsole = { init : function() { document.getElementById("ec2ui.console.instanceid").value = window.arguments[0]; document.getElementById("ec2ui.console.timestamp").value = window.arguments[1]; var output = "<no output available>"; if (window.arguments[2] != null) { ...
JavaScript
var ec2ui_InstanceEventsTreeView = { COLNAMES : ['instanceevent.instanceId','instanceevent.availabilityZone','instanceevent.event', 'instanceevent.description','instanceevent.startTime','instanceevent.endTime'], treeBox : null, selection : null, arrLocalFiles : new Array(), eventList...
JavaScript
var ec2ui_S3_KeyCopier = { session : null, srcKeys : null, params : null, fContinue : true, // The Total number of copy requests issued. // This can be different from the total # keys // to be copied if the user hit CANCEL // The total # of keys to be migrated totalKeys : 0, //...
JavaScript
var ec2_VolumeAttacher = { ec2ui_session : null, retVal : null, volumeId : null, attach : function() { if (!this.validateDevice()) return false; this.retVal.instanceId = document.getElementById("ec2ui.newattachment.instanceId").value.split(":")[0]; this.retVal.volumeId = this.volumeId; this.re...
JavaScript
/* * * Base64 encode / decode * http://www.webtoolkit.info/javascript-base64.html * */ // I'm using this even though there's a base64 implementation in sha1.js // because it doesn't seem to deal with strings of odd-length and the 5 minutes // I've spent looking at it doesn't suggest anything obvious. I have no ...
JavaScript
var ec2_InstanceLauncher = { image : null, ec2ui_session : null, retVal : null, unusedSecGroupsList : null, usedSecGroupsList : null, unused : new Array(), used : new Array(), launch : function() { if (!this.validateMin()) return false; if (!this.validateMax()) return fa...
JavaScript
var ec2ui_credentialManager = { REALM : "chrome://ec2ui/", HOST : "chrome://ec2ui/", credentials : new Array(), endpointmap : null, initDialog : function() { ec2ui_prefs.init(); document.getElementById("ec2ui.credentials.view").view = ec2ui_credentialsTreeView; this.credentials = thi...
JavaScript
var ec2_EBSVolumeAttacher = { ec2ui_session : null, retVal : null, instanceId : null, volList : null, attach : function() { if (!this.validateDevice()) return false; this.retVal.device = document.getElementById("ec2ui.attachebsvolume.device").value; var idxSel = document.ge...
JavaScript
var ec2ui_SnapshotTreeView = { COLNAMES: ['snap.id', 'snap.volumeId', 'snap.volumeSize', 'snap.status', 'snap.startTime', 'snap.progress', 'snap.tag'], imageIdRegex : new RegExp("^snap-"), getSearchText : function() { return document.getElementById('ec2ui.snapshots.search').value; ...
JavaScript
var ec2_VolumeCreator = { ec2ui_session : null, retVal : null, create : function() { this.retVal.size = document.getElementById("ec2ui.newvolume.size").value.trim(); if (this.retVal.size.length == 0) this.retVal.size = null; this.retVal.snapshotId = document.getElementById("ec2ui.n...
JavaScript
function encodeJSONMap(map) { var pairs = new Array(); for (k in map) { if (map.hasOwnProperty(k)) { var v = map[k]; if (v != null) { if (typeof v === 'object') { pairs.push("'"+k+"':"+encodeJSONMap(v)); } else if (typeof v != '...
JavaScript
var ec2_SecGroupCreator = { ec2ui_session : null, retVal : null, createGroup : function() { if (!this.validateGroupName()) return false; if (!this.validateGroupDesc()) return false; this.retVal.name = document.getElementById("ec2ui.newsecgroup.name").value.trim(); this.retVa...
JavaScript
var ec2ui_ReservedInstancesTreeView = { COLNAMES: ['rsvdInst.id', 'rsvdInst.instanceType', 'rsvdInst.azone', 'rsvdInst.start', 'rsvdInst.duration', 'rsvdInst.fixedPrice', 'rsvdInst.usagePrice', 'rsvdInst.count',...
JavaScript