- Create root directory for project:
mkdir magento2.test
- Cd to created directory:
cd magento2.test
$.fn.serializeObject = function serializeObject() { | |
var data = {},pushes = {},named = {}; | |
patterns = { | |
validate: /^[a-z][a-z0-9_-]*(?:\[(?:\d*|[a-z0-9_]+)\])*$/i, | |
key: /[a-z0-9_-]+|(?=\[\])/gi, | |
push: /^$/, | |
fixed: /^\d+$/, | |
named: /^[a-z0-9_-]+$/i | |
}; |
$.extend({ | |
// converts xml documents and xml text to json object | |
json2xml: function(jsonObj,config) { | |
config = config || {}; | |
initConfigDefaults(); | |
var out = parseJSONObject(jsonObj); | |
return out; | |
function initConfigDefaults() { | |
if(config.escapeMode === undefined) { |
$.fn.populate = function populate(value,key) { | |
var input_fields= $(this),new_value=value; | |
patterns = { | |
key: /[a-z0-9_-]+|(?=\[\])/gi, | |
push: /^$/, | |
} | |
input_fields.each(function(i,input_field) { | |
var val,key = $(input_field).attr('name'); | |
if(new_value instanceof Array) { |
function get_combination($array_sets) { | |
$count = count($array_sets); | |
if(is_array($array_sets[0]) && $count > 1) { | |
$first_set = $array_sets[0]; | |
if($count > 2) { | |
$oth_room_set = get_combinations(array_slice($array_sets, 1)); | |
} else { | |
$oth_room_set = $array_sets[1]; | |
} | |
$array_comb = array(); |
class PageStatusExtension extends DataExtension { | |
private static $db = array( | |
'Status' => 'Varchar' | |
); | |
private static $defaults = array( | |
"Status" => "New page", | |
} | |
public onBeforePublish($original) { |
div.TokenizeMeasure, | |
div.Tokenize ul li span, | |
div.Tokenize ul.TokensContainer li.TokenSearch input | |
{ | |
font-family: Arial, Helvetica, sans-serif; | |
font-size: 12px; | |
} | |
div.Tokenize | |
{ |
function megamenu_nav_update( $menu_id, $menu_item_db_id ) { | |
// verify this came from our screen and with proper authorization. | |
if ( ! isset( $_POST['megamenu-nonce'] ) || ! wp_verify_nonce( $_POST['megamenu-nonce'], 'megamenu-nonce-name' ) ) | |
return; | |
if(isset($_POST['mega-menu-colopt'][$menu_item_db_id]) && $_POST['mega-menu-colopt'][$menu_item_db_id] != '') { |
Drop in replace functions for setTimeout() & setInterval() that | |
make use of requestAnimationFrame() for performance where available | |
http://www.joelambert.co.uk | |
Copyright 2011, Joe Lambert. | |
Free to use under the MIT license. | |
http://www.opensource.org/licenses/mit-license.php |
mkdir magento2.test
cd magento2.test
import { Component, OnInit, OnDestroy } from '@angular/core'; | |
import { Router } from '@angular/router'; | |
import { LoginService, AzureService } from '../services' | |
import { User, LiveSession } from '../models' | |
import { SharedService } from "app/services/shared.service"; | |
//declare var SimpleWebRTC; | |
declare var io; | |
declare var conference; | |
@Component({ |