Beispiel #1
0
    /**
     * Render foot.
     *
     * @return  string
     */
    protected function _foot()
    {
        ob_start();
        // todo: Move to page controller
        ?>

	<script>
		head.js(
			{ 'google-maps':        'http://maps.google.com/maps/api/js?sensor=false&callback=isNaN' }, // Use callback hack to initialize correctly
			{ 'jquery':             'http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js' },
			{ 'jquery-ui':          'http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.18/jquery-ui.min.js' },
			{ 'bootstrap':          '<?php 
        echo $this->base;
        ?>
static/js/bootstrap.js' },
			{ 'jquery-markitup':    '<?php 
        echo $this->base;
        ?>
js/jquery.markitup.js' },
			{ 'bbcode':             '<?php 
        echo $this->base;
        ?>
js/markitup.bbcode.js' },
			{ 'jquery-tools':       '<?php 
        echo $this->base;
        ?>
js/jquery.tools.min.js' },
			{ 'jquery-form':        '<?php 
        echo $this->base;
        ?>
js/jquery.form.js' },
			{ 'jquery-imgarea':     '<?php 
        echo $this->base;
        ?>
js/jquery.imgareaselect.js' },
			{ 'jquery-fixedscroll': '<?php 
        echo $this->base;
        ?>
js/jquery-scrolltofixed.js' },
			{ 'anqh':               '<?php 
        echo $this->base;
        ?>
js/anqh.js?2' },
			function _loaded() {
				Anqh.APIURL = '<?php 
        echo Kohana::$config->load('api.url');
        ?>
';
			}
		);
	</script>

<?php 
        echo $this->foot();
        echo Ads::foot();
        return ob_get_clean();
    }
Beispiel #2
0
    /**
     * Render foot.
     *
     * @return  string
     */
    protected function _foot()
    {
        ob_start();
        // todo: Move to page controller
        ?>

<?php 
        echo HTML::script('//maps.googleapis.com/maps/api/js?sensor=false&libraries=places');
        ?>

<script>
	var Anqh = {
		APIURL: '<?php 
        echo Kohana::$config->load('api.url');
        ?>
' || '/api'
	};

	head.js(
		{ 'jquery':        '//cdnjs.cloudflare.com/ajax/libs/jquery/2.0.3/jquery.min.js' },
		{ 'jquery-ui':     '//cdnjs.cloudflare.com/ajax/libs/jqueryui/1.10.3/jquery-ui.min.js' },
		{ 'bootstrap':     '//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.0.3/js/bootstrap.min.js' },
		{ 'typeahead':     '//cdnjs.cloudflare.com/ajax/libs/typeahead.js/0.9.3/typeahead.min.js' },
		{ 'select2':       '//cdnjs.cloudflare.com/ajax/libs/select2/3.4.5/select2.min.js' },
		{ 'geocomplete':   '//cdnjs.cloudflare.com/ajax/libs/geocomplete/1.4/jquery.geocomplete.min.js' },
		{ 'imgareaselect': '//cdnjs.cloudflare.com/ajax/libs/imgareaselect/0.9.10/js/jquery.imgareaselect.min.js' },
		{ 'lazyload':      '//cdnjs.cloudflare.com/ajax/libs/jquery.lazyload/1.9.1/jquery.lazyload.min.js' },
		{ 'vendor':        '<?php 
        echo $this->base;
        ?>
static/js/c/vendor.min.js?_=<?php 
        echo filemtime('static/js/c/vendor.min.js');
        ?>
' },
		{ 'anqh':          '<?php 
        echo $this->base;
        ?>
static/js/c/anqh.min.js?_=<?php 
        echo filemtime('static/js/c/anqh.min.js');
        ?>
' },
		function _loaded() {

			// Search
			var $search = $('form[role=search]');
			if ($search.length) {
				$search.on('submit', function(event) {
					event.preventDefault();
				});

				$search.find('[name=search_events]').autocompleteEvent({
					action:   'redirect'
				});
				$search.find('[name=search_users]').autocompleteUser({
					action:   'redirect'
				});
				$search.find('[name=search_images]').autocompleteUser({
					action:   'redirect',
					position: { my: 'right top', at: 'right bottom', of: '#form-search-images', collision: 'flip' }
				});
			}

		}
	);
</script>

<?php 
        echo Widget::get('foot');
        echo Ads::foot();
        if (Anqh::share()) {
            echo new View_Generic_Share();
        }
        return ob_get_clean();
    }