json-object-editor
Version:
JOE the Json Object Editor | Platform Edition
151 lines (142 loc) • 5.76 kB
HTML
<html>
<head>
<meta charset="utf-8">
<meta name='viewport' content='width=device-width, initial-scale=1, user-scalable=no' />
<title>JOE by Craydent</title>
<link rel="stylesheet" href="capp/capp.css"/>
<script src="_joeinclude.js"></script>
<!--<script src="http://www.craydent.com/JsonObjectEditor/_joecraydent.js"></script>-->
<!--<script src="js/joe-full.js"></script>-->
<script src="capp/capp.js"></script>
<script src="js/demo/joe-craydent-config.js"></script>
<script> var ENV = {scripts_dir:'/catnap/js/'};</script>
</head>
<body bgcolor="#0099aa">
<capp-wrapper class="left-panel">
<capp-header class="capp-retro">
<capp-header-bonus ></capp-header-bonus>
<capp-craydent-icon></capp-craydent-icon>
<capp-title>Craydent API</capp-title>
<capp-menu>
<capp-menu-label title="methods">ƒ</capp-menu-label>
<capp-menu-panel>
<capp-menu-option onclick="goJoe('method',{subset:'Craydent'})">Craydent</capp-menu-option>
<capp-menu-option onclick="goJoe('method',{subset:'JOE'})">JOE</capp-menu-option>
<capp-menu-option onclick="goJoe('method',{subset:'capp'})">Capp</capp-menu-option>
</capp-menu-panel>
<!--<capp-menu-option onclick="capp.Views.show('method','Catnap')">Catnap</capp-menu-option>-->
</capp-menu>
<capp-menu>
<capp-menu-label title="properties">props</capp-menu-label>
<capp-menu-panel>
<capp-menu-option onclick="goJoe('property',{subset:'Craydent'})">Craydent</capp-menu-option>
<capp-menu-option onclick="goJoe('property',{subset:'Craydent'})">JOE</capp-menu-option>
<capp-menu-option onclick="goJoe('property',{subset:'Craydent'})">Capp</capp-menu-option>
</capp-menu-panel>
<!--<capp-menu-option onclick="capp.Views.show('property','Catnap')">Catnap</capp-menu-option>-->
</capp-menu>
<capp-button class="fright">USER</capp-button>
</capp-header>
<capp-body>
<capp-panel class="capp-bg-dark">
<capp-button class="capp-panel-toggle">
<capp-button-icon><-></capp-button-icon>
<capp-button-label>expand / contract</capp-button-label>
</capp-button>
<!--<capp-button>-->
<!--<capp-button-icon>!</capp-button-icon>-->
<!--<capp-button-label>Another Test Button</capp-button-label>-->
<!--</capp-button>-->
<!-- METHODS -->
<capp-menu>
<capp-menu-label onclick="$(this).parent().toggleClass('expanded');">
<capp-button-icon>ƒ</capp-button-icon>
<capp-button-label>Class Methods</capp-button-label>
</capp-menu-label>
<capp-menu-panel>
<capp-menu-option onclick="goJoe('method',{subset:'Craydent'})">
<capp-button-icon>JS</capp-button-icon>
<capp-button-label>Craydent.JS</capp-button-label>
</capp-menu-option>
<capp-menu-option onclick="goJoe('method',{subset:'JOE'})">
<capp-button-icon>JOE</capp-button-icon>
<capp-button-label>JsonObjectEditor</capp-button-label>
</capp-menu-option>
<!-- <capp-menu-option onclick="capp.Views.show('method','Catnap')">
<capp-button-icon>CN</capp-button-icon>
<capp-button-label>Catnap</capp-button-label>
</capp-menu-option>-->
<capp-menu-option onclick="goJoe('method',{subset:'capp'})">
<capp-button-icon>capp</capp-button-icon>
<capp-button-label>Craydent App</capp-button-label>
</capp-menu-option>
</capp-menu-panel>
</capp-menu>
<!-- PROPERTIES -->
<capp-menu>
<capp-menu-label onclick="$(this).parent().toggleClass('expanded');">
<capp-button-icon>Props</capp-button-icon>
<capp-button-label>Public Properties</capp-button-label>
</capp-menu-label>
<capp-menu-panel>
<capp-menu-option onclick="goJoe('property',{subset:'Craydent'})">
<capp-button-icon>JS</capp-button-icon>
<capp-button-label>Craydent.JS</capp-button-label>
</capp-menu-option>
<capp-menu-option onclick="goJoe('property',{subset:'JOE'})">
<capp-button-icon>JOE</capp-button-icon>
<capp-button-label>JsonObjectEditor</capp-button-label>
</capp-menu-option>
<capp-menu-option onclick="goJoe('property',{subset:'Capp'})">
<capp-button-icon>capp</capp-button-icon>
<capp-button-label>Craydent App</capp-button-label>
</capp-menu-option>
</capp-menu-panel>
<!-- <capp-menu-option onclick="capp.Views.show('property','Catnap')">
<capp-button-icon>CN</capp-button-icon>
<capp-button-label>Catnap</capp-button-label>
</capp-menu-option>-->
</capp-menu>
</capp-panel>
<capp-view id="joeHolder"></capp-view>
</capp-body>
</capp-wrapper>
<script>
$c.DEBUG_MODE = true;
var capp = new CraydentApp(true);
var JOE = new JsonObjectEditor(specs());
JOE.init();
function preload(){
var methods = [];
var properties = [];
var apis = [];
var schemas = [];
function addAPI(classobj,classname,classstring){
var j = _joe.analyzeClassObject(classobj,classname,null,classstring);
methods = methods.concat(j.methods);
properties = properties.concat(j.properties);
apis.push({
name:classname,
_id:classname,
methods: j.methods.length,
properties: j.methods.length,
itemtype:'api'
});
}
addAPI(Craydent,'Craydent');
addAPI(JOE,'JOE',JsonObjectEditor);
addAPI(capp,'capp',CraydentApp);
for(var s in _joe.schemas){
schemas.push(_joe.schemas[s]);
}
_joe.addDataset('property',properties);
_joe.addDataset('method',methods);
_joe.addDataset('api',apis);
_joe.addDataset('schema',schemas);
_joe.readHashLink();
}
$(preload);
</script>
</body>
</html>