Exemple #1
0
<button class="bong-dialog-btn">Add
	<script type="text/bongscript" event="click">
	bong.dialog({
		title: 'New <?php 
echo get_class($data->controller) == 'Structs\\Admin\\SpiritController' ? 'Spirit' : 'Controller';
?>
 Method',
		content: 'Method Name: <input type="text" bong:handle="methodName" value="" />',
		buttons: [{
			label: 'Create',
			isDefault: true,
			action: function(){
				bong.href('<?php 
echo Resource::link();
?>
/project/<?php 
echo get_class($data->controller) == 'Structs\\Admin\\SpiritController' ? 'addSpiritMethod' : 'addControllerMethod';
?>
/'+this.methodName.value).eval();
				bong.activeDialog().hide();
			}
		},{
			label: 'Cancel',
			isDefault: false,
			action: function(){
				bong.activeDialog().hide();
			}
		}]
	});
	</script>
</button>
Exemple #2
0
							</div>\
							<?php 
    }
    ?>
\
						</div>\
					</fieldset>\
				</form>',
	buttons: [{
		label: 'Go',
		isDefault: true,
		action: function(){
			var dom = this.method;
			var methodName = this.methodName.value;
			var base = '<?php 
    echo Resource::link("/" . $data->method->controller()->name() . "/" . $data->method->name());
    ?>
/';
			var args = [];
			$('.bong-dialog-form-field').each(function(i, elem){
				if(i > 0){
					var labelText = $(elem).children('label').html();
					var valueText = $(elem).children('input')[0].value;
					args.push(valueText);
				}
			});
			window.open(base+args.join('/'), '_blank');
			args = [];
		}
	},{
		label: 'Cancel',
Exemple #3
0
	<ul class="bong-admin-sidebar-components bong-admin-sidebar-components-spirit" id="sidebar_spirit">
		<li class="bong-admin-sidebar-components-label">Spirits</li>
		<?php 
foreach ($data->spirits as $spirit) {
    ?>
	
			<li class="bong-admin-sidebar-components-item">
				<a href="<?php 
    echo Resource::link('/project/sspirit/' . $spirit->name());
    ?>
"><?php 
    echo $spirit->name();
    ?>
Abstractor</a>
				<a class="bong-admin-sidebar-components-item-cross"></a>
			</li>
		<?php 
}
?>
		<?php 
$controller->spirit('SpiritList')->addNew();
?>
	</ul>
Exemple #4
0
$('<li class="bong-admin-sidebar-components-item"><a href="<?php 
echo Resource::link('/project/controller/' . $data->name);
?>
"><?php 
echo $data->name;
?>
Controller</a><a class="bong-admin-sidebar-components-item-cross"></a></li>').insertBefore("#sidebar_controller > .bong-admin-sidebar-components-item-spcl");
bong.dialog({
	title: 'Creating <?php 
echo $data->name;
?>
Controller',
	content: '<?php 
echo $data->controller->className();
?>
 created in `<?php 
echo $data->controller->filePath();
?>
`',
	buttons: [{
		label: 'Okay',
		isDefault: true,
		action: function(){
			bong.activeDialog().hide();
		}
	}]
});
Exemple #5
0
	<ul class="bong-admin-sidebar-components bong-admin-sidebar-components-controller" id="sidebar_controller">
		<li class="bong-admin-sidebar-components-label">Controllers</li>
		<?php 
foreach ($data->controllers as $con) {
    ?>
	
			<li class="bong-admin-sidebar-components-item <?php 
    echo $xdo->controllerName && $xdo->controllerName == $con->name() ? 'bong-admin-sidebar-components-item-selected' : null;
    ?>
">
				<a href="<?php 
    echo Resource::link('/project/controller/' . $con->name());
    ?>
"><?php 
    echo $con->name();
    ?>
Controller</a>
				<a class="bong-admin-sidebar-components-item-cross"></a>
			</li>
		<?php 
}
?>
		<?php 
$controller->spirit('ControllerList')->addNew();
?>
	</ul>
Exemple #6
0
$('<li class="bong-admin-sidebar-components-item"><a href="<?php 
echo Resource::link('/project/sspirit/' . $data->name);
?>
"><?php 
echo $data->name;
?>
Abstractor</a><a class="bong-admin-sidebar-components-item-cross"></a></li>').insertBefore("#sidebar_spirit > .bong-admin-sidebar-components-item-spcl");
bong.dialog({
	title: 'Creating <?php 
echo $data->name;
?>
Abstractor',
	content: '<?php 
echo $data->spirit->className();
?>
 created in `<?php 
echo $data->spirit->filePath();
?>
`',
	buttons: [{
		label: 'Okay',
		isDefault: true,
		action: function(){
			bong.activeDialog().hide();
		}
	}]
});