当前位置: 首页>>代码示例>>PHP>>正文


PHP minify_js函数代码示例

本文整理汇总了PHP中minify_js函数的典型用法代码示例。如果您正苦于以下问题:PHP minify_js函数的具体用法?PHP minify_js怎么用?PHP minify_js使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了minify_js函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: compress_file

function compress_file($file, $tipo = 'js')
{
    global $root_dir;
    $result = file_get_contents($root_dir . 'img/' . $file);
    $len_antes = strlen($result);
    echo '<tr><td><b>' . strtoupper($tipo) . '</b></td><td>' . $file . '</td><td align="right"><b>' . num($len_antes) . '</b>bytes</td>';
    switch ($tipo) {
        case 'js':
            $result = minify_js($result);
            break;
        case 'css':
            $result = minify_css($result);
            $result = str_replace('url(img/', 'url(lib/kickstart/css/img/', $result);
            /* corrige URLs de kickstart (codigo malo) */
            $result = str_replace('url(\'img/', 'url(\'lib/kickstart/css/img/', $result);
            /* corrige URLs de kickstart (codigo malo) */
            break;
    }
    $len_ahora = strlen($result);
    echo '<td align="right">- <b>' . num($len_antes - $len_ahora) . '</b>bytes = </td><td align="right"><b>' . num($len_ahora) . '</b>bytes</td><td align="right">' . num(100 - $len_ahora * 100 / $len_antes, 1) . '%</td></tr>';
    $result = '/* ' . $file . ' */' . "\n" . $result . "\n";
    return $result;
}
开发者ID:rafacouto,项目名称:VirtualPol,代码行数:23,代码来源:cron-compress-all.php

示例2: parseFile

/**
 * Compiles, and minifies a file
 * @param $file string The filename to process
 */
function parseFile($file)
{
    echo "Compiling {$file}\n";
    $contents = file_get_contents($file);
    $extension = "";
    if (strpos($file, ".coffee")) {
        $ar = compile_coffee($contents, true, $file);
        $contents = $ar["contents"];
        $file = $ar["file"];
        $extension = ".js";
    }
    if (strpos($file, ".js") || $extension == ".js") {
        $ar = minify_js($contents, true, $file);
        $contents = $ar["contents"];
        $file = $ar["file"];
        $extension = ".min.js";
    }
    if (strpos($file, ".css")) {
        $ar = minify_css($contents, true, $file);
        $contents = $ar["contents"];
        $file = $ar["file"];
        $extension = ".min.css";
    }
}
开发者ID:WickedMonkeySoftware,项目名称:old_appti2ude,代码行数:28,代码来源:compiler.php

示例3: get_option_list

  <td>&nbsp;</td>
  <td style='text-align: left; padding-top:25px;'>
  <select id='year__financialyears' name='year__financialyears' class='drop-down'>
  <?php 
echo get_option_list($this, 'financialyears', 'select', '', array('selected' => get_current_quarter('financial_year')));
?>
  </select></td>
  <td>&nbsp;</td>
</tr>

<tr>
  <td>&nbsp;</td>
  <td class='fill-page' style="vertical-align:top;"><div class='three-columns' id='stat_container'>
<?php 
$this->load->view('reports/pde_stats', array('list' => $list));
?>
</div>
</td>
  <td>&nbsp;</td>
</tr>

<?php 
$this->load->view('addons/secure_footer');
?>

</table>
<?php 
echo minify_js('accounts__pde_dashboard', array('jquery-2.1.1.min.js', 'jquery-ui.js', 'jquery.form.js', 'pss.js', 'pss.shadowbox.js'));
?>
</body>
</html>
开发者ID:nwtug,项目名称:pss-version-1.0,代码行数:31,代码来源:pde_dashboard.php

示例4: base_url

    ?>
' />
    <input type='hidden' id='redirectaction' name='redirectaction' value='<?php 
    echo base_url() . 'organizations/settings/view/Y';
    ?>
' />
    <input type='hidden' id='resultsdiv' name='resultsdiv' value='' /></td></tr>
</table>
<?php 
}
?>






</td>
<td>&nbsp;</td>
</tr>

<?php 
$this->load->view('addons/secure_footer');
?>

</table>
<?php 
echo minify_js('organizations__settings', array('jquery-2.1.1.min.js', 'jquery-ui.js', 'jquery.datepick.js', 'jquery.form.js', 'pss.js', 'pss.shadowbox.js', 'pss.pagination.js', 'pss.fileform.js', 'pss.list.js', 'pss.datepicker.js'));
?>
</body>
</html>
开发者ID:nwtug,项目名称:pss-version-1.0,代码行数:31,代码来源:settings.php

示例5: base_url

?>
assets/css/pss.shadowbox.css" type="text/css" media="screen" />


<table class='normal-table microform ignoreclear'>

<tr><td><input type="text" id="reason__contactreason" name="reason__contactreason" placeholder="Enter or Select reason" class="drop-down searchable do-not-clear" value="" style="width:100%;"/></td></tr>

<tr><td><textarea id='details' name='details' placeholder='Details (Max 500 characters)' class='limit-chars' data-max='500' style='width:100%;height: 100px;'></textarea></td></tr>


<tr><td><button type="button" id="messagebtn" name="messagebtn" class="btn blue submitmicrobtn" style="width:100%;">Send</button>
<input type='hidden' id='action' name='action' value='<?php 
echo base_url() . $action;
?>
' />
<input type='hidden' id='redirectaction' name='redirectaction' value='<?php 
echo base_url() . $redirect;
?>
' />
<input type='hidden' id='resultsdiv' name='resultsdiv' value='' />

<input name="layerid" id="layerid" type="hidden" value="" />
<input name="idlist" id="idlist" type="hidden" value="<?php 
echo $id_list;
?>
" /></td></tr>
</table>
<?php 
echo minify_js('pages__send_from_list', array('jquery-2.1.1.min.js', 'jquery-ui.js', 'jquery.form.js', 'jquery.datepick.js', 'pss.js', 'pss.shadowbox.js', 'pss.fileform.js', 'pss.pagination.js'));
开发者ID:nwtug,项目名称:pss-version-1.0,代码行数:30,代码来源:send_from_list.php

示例6: base_url

echo base_url() . 'bids/best_evaluated';
?>
' />
    <input type='hidden' id='redirectaction' name='redirectaction' value='<?php 
echo base_url() . 'bids/manage/a/best_bidders';
?>
' />
    <input type='hidden' id='resultsdiv' name='resultsdiv' value='' />
    </td></tr>
</table>







</td>
<td>&nbsp;</td>
</tr>

<?php 
$this->load->view('addons/secure_footer');
?>

</table>
<?php 
echo minify_js('new_bid', array('jquery-2.1.1.min.js', 'jquery-ui.js', 'jquery.datepick.js', 'jquery.form.js', 'pss.js', 'pss.shadowbox.js', 'pss.pagination.js', 'pss.fileform.js', 'pss.list.js', 'pss.datepicker.js'));
?>
</body>
</html>
开发者ID:nwtug,项目名称:pss-version-1.0,代码行数:31,代码来源:best_evaluated.php

示例7: minify_js

</div>
<button type='button' id='refreshlist' name='refreshlist' style='display:none;'></button></td></tr>
</td></tr>
</table>







</td>
<td>&nbsp;</td>
</tr>

<?php 
$this->load->view('addons/secure_footer');
?>

</table>
<?php 
echo minify_js('reports__manage', array('jquery-2.1.1.min.js', 'jquery-ui.js', 'jquery.form.js', 'pss.js', 'pss.shadowbox.js', 'pss.pagination.js', 'pss.fileform.js', 'pss.list.js'));
?>

<script>
$(function(){
	$('#paginationdiv__report_list').width($(window).width() - 103);
});
</script>
</body>
</html>
开发者ID:nwtug,项目名称:pss-version-1.0,代码行数:31,代码来源:manage.php

示例8: base_url

<!DOCTYPE html>
<html >
  <head>
    <meta charset="UTF-8">
    <title>Academia School Registration </title>    
    <!-- Load CSS Academia Beta --> 
     <link rel="stylesheet" href="<?php 
echo base_url();
?>
assets/css/academia_beta.css">    
    <!-- Javascript -->
    <?php 
echo minify_js('account-registration', array('jquery-2.1.1.min.js', 'jquery-ui.js', 'jquery.form.js', 'registration.js'));
?>
  </head>

  <body>

    <hgroup>
  <h1><img src="<?php 
echo base_url();
?>
assets/images/sims_login.png" /></h1>
</hgroup>
<div class="container">


<form action="<?php 
echo base_url();
?>
registration/register_school_account" method="post" class="formmod col-md-9 ">
开发者ID:nwtug,项目名称:academia,代码行数:31,代码来源:schoolregistration.php

示例9: base_url



<table class='normal-table microform ignoreclear'>

<tr><td><textarea id='details' name='details' placeholder='Details (Max 500 characters)' class='limit-chars' data-max='500' style='width:100%;height: 100px;'></textarea></td></tr>


<tr><td><button type="button" id="messagebtn" name="messagebtn" class="btn blue submitmicrobtn" style="width:100%;">Submit</button>
<input type='hidden' id='action' name='action' value='<?php 
echo base_url() . 'forums/add_comment';
?>
' />
<input type='hidden' id='redirectaction' name='redirectaction' value='<?php 
echo base_url() . 'forums/add_comment/a/confirm';
?>
' />
<input type='hidden' id='resultsdiv' name='resultsdiv' value='' />

<input name="layerid" id="layerid" type="hidden" value="" />
<input name="forumid" id="forumid" type="hidden" value="<?php 
echo $d;
?>
" />
<input name="respondingto" id="respondingto" type="hidden" value="<?php 
echo !empty($r) ? $r : '';
?>
" /></td></tr>
</table>
<?php 
echo minify_js('forums__add_comment', array('jquery-2.1.1.min.js', 'jquery-ui.js', 'jquery.form.js', 'jquery.datepick.js', 'pss.js', 'pss.shadowbox.js', 'pss.fileform.js', 'pss.pagination.js'));
开发者ID:nwtug,项目名称:pss-version-1.0,代码行数:28,代码来源:add_comment.php

示例10: minify_js

<div class='body-title'>Providers</div>
<div class="body-content"><table>
<tr><td>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec scelerisque blandit nulla non bibendum. Donec blandit ultricies eros. Suspendisse quis nisi volutpat justo tincidunt vehicula vitae sit amet tellus. Sed lacus turpis, dignissim non arcu ac, dictum maximus dui. Nulla congue orci at libero facilisis aliquet. Sed in mauris et eros ornare pretium eu ac quam. Phasellus metus erat, faucibus ut commodo non, varius eu felis. Morbi sit amet lacus maximus, placerat augue eget, ornare velit.
<br /><br />
Ut rhoncus vel lacus nec sagittis. Quisque rutrum lectus sed magna tempus facilisis. Nunc auctor, neque ut cursus blandit, nibh libero pharetra turpis, et dignissim mi dolor sit amet mi. Nullam scelerisque magna eu mi facilisis, at posuere dolor imperdiet. Sed vitae arcu eu libero bibendum scelerisque a nec nisl. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean iaculis efficitur sem, sit amet condimentum enim scelerisque et. Nam mollis turpis a aliquam iaculis. Curabitur cursus sollicitudin ante, eu aliquam dui vehicula eget. Morbi tempor sollicitudin porttitor. Donec in feugiat purus. Interdum et malesuada fames ac ante ipsum primis in faucibus. Donec eget justo orci.
<br /><br />

Ut rhoncus vel lacus nec sagittis. Quisque rutrum lectus sed magna tempus facilisis. Nunc auctor, neque ut cursus blandit, nibh libero pharetra turpis, et dignissim mi dolor sit amet mi. Nullam scelerisque magna eu mi facilisis, at posuere dolor imperdiet. Sed vitae arcu eu libero bibendum scelerisque a nec nisl. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean iaculis efficitur sem, sit amet condimentum enim scelerisque et. Nam mollis turpis a aliquam iaculis. Curabitur cursus sollicitudin ante, eu aliquam dui vehicula eget. Morbi tempor sollicitudin porttitor. Donec in feugiat purus. Interdum et malesuada fames ac ante ipsum primis in faucibus. Donec eget justo orci. 
<br /><br />

<table><tr><td><button class='button btn blue small' data-url='providers'>Registry of Providers</button></td></tr></table>
<br /><br />
</td></tr>
</table></div>


</td>
  <td>&nbsp;</td>
</tr>

<?php 
$this->load->view('addons/public_footer');
?>

</table>
<?php 
echo minify_js('pages__providers', array('jquery-2.1.1.min.js', 'jquery-ui.js', 'jquery.form.js', 'pss.js', 'pss.shadowbox.js'));
?>
</body>
</html>
开发者ID:nwtug,项目名称:pss-version-1.0,代码行数:31,代码来源:providers.php

示例11: base_url

<?php

$css = "<link rel='stylesheet' href='" . base_url() . "assets/css/pss.css' type='text/css' media='screen' />" . "<link rel='stylesheet' href='" . base_url() . "assets/css/pss.list.css' type='text/css' media='screen' />";
if (!empty($msg)) {
    echo $css . format_notice($this, $msg);
} else {
    echo "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html lang='en'>\n<head><meta charset=\"utf-8\">\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n\t<title>Comments</title>\n    " . $css . "\n</head>\n<body>\n<div id='delete_result'></div>\n<table class='list-table'><tr><th style='width:1%'>&nbsp;</th><th>Comment</th><th>Posted By</th><th>Posted On</th></tr>";
    foreach ($list as $row) {
        echo "<tr id='row_" . $row['comment_id'] . "'>\n<td>";
        if ($this->native_session->get('__user_type') == 'admin' || $this->native_session->get('__user_type') == 'pde' && $this->native_session->get('__organization_id') == $row['entered_by_organization']) {
            echo "<a href='javascript:;' onclick=\"confirmActionToLayer('" . base_url() . "forums/remove_comment/row_id/row_" . $row['comment_id'] . "', 'comments_" . $row['comment_id'] . "', '', 'row_" . $row['comment_id'] . "___delete_result', 'Are you sure you want to remove this comment?')\"><img src='" . IMAGE_URL . "remove_icon.png' border='0'></a>\n\t\n\t<input type='hidden' id='comments_" . $row['comment_id'] . "' name='comments[]' value='" . $row['comment_id'] . "' />";
        } else {
            echo "&nbsp;";
        }
        echo "</td>\n<td>" . $row['comment'] . "</td>\n<td style='vertical-align:top;'>" . $row['entered_by'] . "</td>\n<td style='vertical-align:top;'>" . date(FULL_DATE_FORMAT, strtotime($row['date_added'])) . "</td>\n</tr>";
    }
    echo "</table>\n</div>\n\n<input type='hidden' id='layerid' name='layerid' value='' />";
    echo minify_js('forums__comments', array('jquery-2.1.1.min.js', 'pss.js', 'pss.shadowbox.js', 'pss.fileform.js'));
    echo "</body>\n</html>";
}
开发者ID:nwtug,项目名称:pss-version-1.0,代码行数:20,代码来源:comments.php

示例12: minify_js

?>
' />
    <input type='hidden' id='resultsdiv' name='resultsdiv' value='' />
<?php 
if (!empty($user['user_id'])) {
    echo "<input type='hidden' id='user_id' name='user_id' value='" . $user['user_id'] . "' />";
}
?>
</td></tr>
</table>







</td>
<td>&nbsp;</td>
</tr>

<?php 
$this->load->view('addons/secure_footer');
?>

</table>
<?php 
echo minify_js('contracts__new_tender', array('jquery-2.1.1.min.js', 'jquery-ui.js', 'jquery.datepick.js', 'jquery.form.js', 'pss.js', 'pss.shadowbox.js', 'pss.pagination.js', 'pss.fileform.js', 'pss.list.js', 'pss.datepicker.js'));
?>
</body>
</html>
开发者ID:nwtug,项目名称:pss-version-1.0,代码行数:31,代码来源:new_user.php

示例13: format_notice

    echo format_notice($this, $msg);
} else {
    ?>
<table class='normal-table microform ignoreclear'>

<tr><td><select id='user__permissiongroups' name='user__permissiongroups' class='drop-down' style="width:100%;">
<?php 
    echo get_option_list($this, 'permissiongroups');
    ?>
</select></td></tr>

<tr><td><button type="button" id="applygroup" name="applygroup" class="btn blue submitmicrobtn" style="width:100%;">Apply Group</button>
<input type='hidden' id='action' name='action' value='<?php 
    echo base_url() . 'users/update_permissions';
    ?>
' />
<input type='hidden' id='redirectaction' name='redirectaction' value='<?php 
    echo base_url() . 'users/update_permissions/result/msg';
    ?>
' />
<input type='hidden' id='resultsdiv' name='resultsdiv' value='' />

<input name="layerid" id="layerid" type="hidden" value="" />
<input name="idlist" id="idlist" type="hidden" value="<?php 
    echo $id_list;
    ?>
" /></td></tr>
</table>
<?php 
    echo minify_js('users__update_permissions', array('jquery-2.1.1.min.js', 'jquery-ui.js', 'jquery.form.js', 'pss.js', 'pss.shadowbox.js', 'pss.fileform.js', 'pss.pagination.js'));
}
开发者ID:nwtug,项目名称:pss-version-1.0,代码行数:31,代码来源:update_permissions.php

示例14: base_url

    <input type='hidden' id='action' name='action' value='<?php 
echo base_url() . 'links/add';
?>
' />
    <input type='hidden' id='redirectaction' name='redirectaction' value='<?php 
echo base_url() . 'links/manage';
?>
' />
    <input type='hidden' id='resultsdiv' name='resultsdiv' value='' /></td></tr>
</table>







</td>
<td>&nbsp;</td>
</tr>

<?php 
$this->load->view('addons/secure_footer');
?>

</table>
<?php 
echo minify_js('links__new_link', array('jquery-2.1.1.min.js', 'jquery.form.js', 'pss.js', 'pss.shadowbox.js', 'pss.pagination.js', 'pss.fileform.js', 'pss.list.js'));
?>
</body>
</html>
开发者ID:nwtug,项目名称:pss-version-1.0,代码行数:31,代码来源:new_link.php

示例15: base_url

?>
documents/index/a/standards'>Get Standard Forms</a></td></tr>
<tr><td><a href='<?php 
base_url();
?>
pages/regulations'>Procurement Regulations</a></td></tr>
<tr><td><a href='<?php 
echo BASE_URL;
?>
documents/index/a/training_activities'>Training Activities</a></td></tr>
<tr><td><a href='<?php 
echo BASE_URL;
?>
documents/index/a/important_links'>Important Links</a></td></tr>
<tr><td><div class='btn stripped-black' data-rel='pages/portal'>More Services</div></td></tr>
</table></div>

</td>
  <td>&nbsp;</td>
</tr>

<?php 
$this->load->view('addons/public_footer');
?>

</table>
<?php 
echo minify_js('home', array('jquery-2.1.1.min.js', 'jquery-ui.js', 'jquery.form.js', 'pss.js', 'pss.shadowbox.js'));
?>
</body>
</html>
开发者ID:nwtug,项目名称:pss-version-1.0,代码行数:31,代码来源:home.php


注:本文中的minify_js函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。