Esempio n. 1
0
 /**
  * Test function associated with Stylesheet
  *
  * @return void
  * @test
  */
 public function testStylesheetViewFunctions()
 {
     $this->assertInstanceOf(Zbase\Models\View\Javascript::class, zbase_view_javascript_add('script', 'script.js', 'lte IE 8', []));
     $links = ['scriptOne' => ['src' => 'scriptOne.js'], 'scriptTwo' => ['src' => 'scriptTwo.js'], 'scriptThree' => ['src' => 'scriptThree.js'], 'scriptFour' => ['src' => 'scriptFour.js']];
     $this->assertEquals(5, count(zbase_view_javascripts_set($links)));
     $this->assertInstanceOf(Zbase\Models\View\Javascript::class, zbase_view_javascript('scriptThree'));
     $this->assertNotInstanceOf(Zbase\Models\View\Javascript::class, zbase_view_javascript('scriptFive'));
     $this->assertTrue(zbase_view_javascript_has('scriptThree'));
     $this->assertFalse(zbase_view_javascript_has('scriptFive'));
     $this->assertEquals(5, count(zbase_view_javascripts($links)));
 }
Esempio n. 2
0
$isMobile = zbase_is_mobile();
$isMobileTablet = zbase_is_mobileTablet();
if (zbase_is_angular_template()) {
    ?>
	@include(zbase_view_file('type.angular'))
	<?php 
} else {
    ?>
	<?php 
    $prefix = zbase_tag();
    zbase_view_plugin_load('jquery');
    zbase_view_plugin_load('zbase');
    zbase_view_plugin_load('mobileangular');
    $mobileAngular = ['id' => 'mobileangular-zbase', 'type' => \Zbase\Models\View::JAVASCRIPT, 'src' => zbase_url_from_route('angular-js'), 'enable' => true, 'position' => 496];
    zbase_view_javascripts_set(['mobileangular-zbase' => $mobileAngular]);
    ?>
	<!DOCTYPE html>
	<html ng-app="MobileAngularUi<?php 
    echo $prefix;
    ?>
" ng-controller="MainController">
		<head>
			<meta charset="utf-8" />
			<base href="/admin" />
			<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
			<meta name="apple-mobile-web-app-capable" content="yes" />
			<meta name="viewport" content="user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimal-ui" />
			<meta name="apple-mobile-web-app-status-bar-style" content="yes" />
			<script type="text/javascript">var isAngular = true;</script>
			{!! zbase_view_render_head() !!}