本文整理汇总了PHP中osc_esc_js函数的典型用法代码示例。如果您正苦于以下问题:PHP osc_esc_js函数的具体用法?PHP osc_esc_js怎么用?PHP osc_esc_js使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了osc_esc_js函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: customHead
function customHead()
{
?>
<script type="text/javascript">
$(document).ready(function() {
$("#dialog-widget-delete").dialog({
autoOpen: false,
modal: true,
title: '<?php
echo osc_esc_js(__('Delete widget'));
?>
'
});
});
// dialog delete function
function delete_dialog(widget_id) {
$("#dialog-widget-delete input[name='id']").attr('value', widget_id);
$("#dialog-widget-delete").dialog('open');
return false;
}
</script>
<?php
}
开发者ID:oanav,项目名称:closetshare,代码行数:25,代码来源:widgets.php
示例2: customHead
function customHead()
{
echo '<script type="text/javascript" src="' . osc_current_admin_theme_js_url('jquery.validate.min.js') . '"></script>';
?>
<script type="text/javascript">
$(document).ready(function() {
$("#dialog-widget-delete").dialog({
autoOpen: false,
modal: true,
title: '<?php
echo osc_esc_js(__('Delete widget'));
?>
'
});
});
// dialog delete function
function delete_dialog(widget_id) {
$("#dialog-widget-delete input[name='id']").attr('value', widget_id);
$("#dialog-widget-delete").dialog('open');
return false;
}
</script>
<?php
}
开发者ID:semul,项目名称:Osclass,代码行数:26,代码来源:widgets.php
示例3: fjs_search
function fjs_search()
{
echo "\n";
?>
var sQuery = '<?php
echo osc_esc_js(osc_get_preference('keyword_placeholder', 'seeker'));
?>
' ;
$(document).ready(function(){
var element = $('input[name="sPattern"]');
element.focus(function(){
$(this).prev().hide();
}).blur(function(){
if($(this).val() == '') {
$(this).prev().show();
}
}).prev().click(function(){
$(this).hide();
$(this).next().focus();
});
if(element.val() != ''){
element.prev().hide();
}
});
function doSearch() {
var sPattern = $('input[name=sPattern]');
if(sPattern.val() == ''){
return false;
}
return true;
}
<?php
}
开发者ID:ricktaylord,项目名称:osclass-themes,代码行数:33,代码来源:inc.search.php
示例4: customHead
function customHead()
{
?>
<script type="text/javascript">
$(document).ready(function() {
// dialog delete
$("#dialog-delete-theme").dialog({
autoOpen: false,
modal: true,
title: '<?php
echo osc_esc_js(__('Delete theme'));
?>
'
});
});
// dialog delete function
function delete_dialog(theme) {
$("#dialog-delete-theme input[name='webtheme']").attr('value', theme);
$("#dialog-delete-theme").dialog('open');
return false;
}
</script>
<?php
}
开发者ID:mylastof,项目名称:os-class,代码行数:25,代码来源:index.php
示例5: customHead
function customHead()
{
?>
<script type="text/javascript">
$(document).ready(function(){
// Code for form validation
$("form[name=currency_form]").validate({
rules: {
pk_c_code: {
required: true,
minlength: 3,
maxlength: 3
},
s_name: {
required: true,
minlength: 1
}
},
messages: {
pk_c_code: {
required: '<?php
echo osc_esc_js(__('Currency code: this field is required'));
?>
.',
minlength: '<?php
echo osc_esc_js(__('Currency code: this field is required'));
?>
.',
maxlength: '<?php
echo osc_esc_js(__('Currency code: this field is required'));
?>
.'
},
s_name: {
required: '<?php
echo osc_esc_js(__('Name: this field is required'));
?>
.',
minlength: '<?php
echo osc_esc_js(__('Name: this field is required'));
?>
.'
}
},
wrapper: "li",
errorLabelContainer: "#error_list",
invalidHandler: function(form, validator) {
$('html,body').animate({ scrollTop: $('h1').offset().top }, { duration: 250, easing: 'swing'});
},
submitHandler: function(form){
$('button[type=submit], input[type=submit]').attr('disabled', 'disabled');
form.submit();
}
});
});
</script>
<?php
}
开发者ID:oanav,项目名称:closetshare,代码行数:58,代码来源:currency_form.php
示例6: customHead
function customHead()
{
?>
<script type="text/javascript" src="<?php
echo osc_current_admin_theme_js_url('jquery.validate.min.js');
?>
"></script>
<script type="text/javascript">
$(document).ready(function(){
// Code for form validation
$("form[name=currency_form]").validate({
rules: {
pk_c_code: {
required: true,
minlength: 3,
maxlength: 3
},
s_name: {
required: true,
minlength: 1
}
},
messages: {
pk_c_code: {
required: '<?php
echo osc_esc_js(__('Currency code: this field is required'));
?>
.',
minlength: '<?php
echo osc_esc_js(__('Currency code: this field is required'));
?>
.',
maxlength: '<?php
echo osc_esc_js(__('Currency code: this field is required'));
?>
.'
},
s_name: {
required: '<?php
echo osc_esc_js(__('Name: this field is required'));
?>
.',
minlength: '<?php
echo osc_esc_js(__('Name: this field is required'));
?>
.'
}
},
wrapper: "li",
errorLabelContainer: "#error_list",
invalidHandler: function(form, validator) {
$('html,body').animate({ scrollTop: $('h1').offset().top }, { duration: 250, easing: 'swing'});
}
});
});
</script>
<?php
}
开发者ID:semul,项目名称:Osclass,代码行数:58,代码来源:currency_form.php
示例7: customHead
function customHead()
{
$all = osc_get_preference('location_todo');
if ($all == '') {
$all = 0;
}
$worktodo = LocationsTmp::newInstance()->count();
?>
<script type="text/javascript">
function reload() {
window.location = '<?php
echo osc_admin_base_url(true) . '?page=tools&action=locations';
?>
';
}
function ajax_() {
$.ajax({
type: "POST",
url: '<?php
echo osc_admin_base_url(true);
?>
?page=ajax&action=location_stats&<?php
echo osc_csrf_token_url();
?>
',
dataType: 'json',
success: function(data) {
if(data.status=='done') {
$('span#percent').html(100);
}else{
var pending = data.pending;
var all = <?php
echo osc_esc_js($all);
?>
;
var percent = parseInt( ((all-pending)*100) / all );
$('span#percent').html(percent);
ajax_();
}
}
});
}
$(document).ready(function(){
if(<?php
echo $worktodo;
?>
> 0) {
ajax_();
}
});
</script>
<?php
}
开发者ID:mylastof,项目名称:os-class,代码行数:55,代码来源:locations.php
示例8: customHead
function customHead()
{
?>
<script type="text/javascript">
$(document).ready(function(){
// Code for form validation
$.validator.addMethod('customrule', function(value, element) {
if($('input:radio[name=purge_searches]:checked').val()=='custom') {
if($("#custom_queries").val()=='') {
return false;
}
}
return true;
});
$("form[name=searches_form]").validate({
rules: {
custom_queries: {
digits: true,
customrule: true
}
},
messages: {
custom_queries: {
digits: '<?php
echo osc_esc_js(__('Custom number: this field must only contain numeric characters'));
?>
.',
customrule: '<?php
echo osc_esc_js(__('Custom number: this field cannot be left empty'));
?>
.'
}
},
wrapper: "li",
errorLabelContainer: "#error_list",
invalidHandler: function(form, validator) {
$('html,body').animate({ scrollTop: $('h1').offset().top }, { duration: 250, easing: 'swing'});
},
submitHandler: function(form){
$('button[type=submit], input[type=submit]').attr('disabled', 'disabled');
form.submit();
}
});
});
</script>
<?php
}
开发者ID:mylastof,项目名称:os-class,代码行数:49,代码来源:searches.php
示例9: cookie_load
function cookie_load()
{
?>
<script type="text/javascript" >
$(document).ready(function () {
var options = new Object();
<?php
if (osc_get_preference('accept', 'cookie') == 1) {
echo 'options.cookieAcceptButton = true;';
}
if (osc_get_preference('decline', 'cookie') == 1) {
echo 'options.cookieDeclineButton = true;';
}
if (osc_get_preference('reset', 'cookie') == 1) {
echo 'options.cookieResetButton = true;';
}
echo "options.cookiePolicyLink = '" . osc_esc_js(osc_get_preference('policy_link', 'cookie')) . "';";
echo "options.cookieWhatAreTheyLink = '" . osc_esc_js(osc_get_preference('what_are_link', 'cookie')) . "';";
echo "options.cookieAnalyticsMessage = '" . str_replace("'", "\\'", osc_get_preference('analytics_msg', 'cookie')) . "';";
echo "options.cookieMessage = '" . str_replace("'", "\\'", osc_get_preference('non_analytics_msg', 'cookie')) . "';";
if (osc_get_preference('analytics_id', 'cookie') != '') {
?>
options.cookieAnalytics = true;
if (jQuery.cookie('cc_cookie_decline') == "cc_cookie_decline") {
} else {
var _gaq = _gaq || [];
_gaq.push(['_setAccount', '<?php
echo osc_get_preference('analytics_id', 'cookie');
?>
']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document. getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
}
<?php
} else {
echo 'options.cookieAnalytics = false;';
}
?>
$.cookieCuttr(options);
});
</script>
<?php
}
开发者ID:oanav,项目名称:closetshare,代码行数:48,代码来源:index.php
示例10: customHead
function customHead() { ?>
<script type="text/javascript">
$(document).ready(function(){
$('input:hidden[name="installed"]').each(function() {
$(this).parent().parent().children().css('background', 'none');
if( $(this).val() == '1' ) {
if( $(this).attr("enabled") == 1 ) {
$(this).parent().parent().css('background-color', '#EDFFDF');
} else {
$(this).parent().parent().css('background-color', '#FFFFDF');
}
} else {
$(this).parent().parent().css('background-color', '#FFF0DF');
}
});
// dialog delete
$("#dialog-uninstall").dialog({
autoOpen: false,
modal: true,
title: '<?php echo osc_esc_js( __('Uninstall plugin') ); ?>'
});
$('.plugin-tooltip').each(function(){
$(this).osc_tooltip('<?php echo osc_esc_js(__('Problems with this plugin? Ask for support.')); ?>',{layout:'gray-tooltip',position:{x:'right',y:'middle'}});
});
});
// dialog delete function
function uninstall_dialog(plugin, title) {
$("#dialog-uninstall input[name='plugin']").attr('value', plugin);
$("#dialog-uninstall").dialog('option', 'title', title);
$("#dialog-uninstall").dialog('open');
return false;
}
</script>
<?php
}
开发者ID:pombredanne,项目名称:ArcherSys,代码行数:40,代码来源:index.php
示例11: while
} else {
?>
<?php
$i = 1;
while (osc_has_alerts()) {
?>
<div class="userItem" >
<div class="title-has-actions">
<h3><?php
_e('Alert', 'osclassclsx');
?>
<?php
echo $i;
?>
</h3> <a onclick="javascript:return confirm('<?php
echo osc_esc_js(__('This action can\'t be undone. Are you sure you want to continue?', 'benderw'));
?>
');" href="<?php
echo osc_user_unsubscribe_alert_url();
?>
"><?php
_e('Delete this alert', 'osclassclsx');
?>
</a><div class="clear"></div></div>
<div>
<?php
osc_current_web_theme_path('loop.php');
?>
<?php
if (osc_count_items() == 0) {
?>
开发者ID:kraymond70,项目名称:osclassclsx,代码行数:31,代码来源:user-alerts.php
示例12: osc_esc_js
?>
', '');
}
<?php
}
?>
<?php
if (osc_locale_dec_point() != '') {
?>
var tmp = price.split('<?php
echo osc_esc_js(osc_locale_dec_point());
?>
');
if(tmp.length>2) {
price = tmp[0]+'<?php
echo osc_esc_js(osc_locale_dec_point());
?>
'+tmp[1];
}
<?php
}
?>
$("#price").prop("value", price);
});
});
<?php
}
?>
</script>
<?php
osc_current_web_theme_path('footer.php');
开发者ID:mylastof,项目名称:os-class,代码行数:31,代码来源:item-post.php
示例13: toDatatablesFormat
private function toDatatablesFormat()
{
$this->result['iTotalRecords'] = $this->total;
$this->result['iTotalDisplayRecords'] = $this->total_filtered;
$this->result['sEcho'] = $this->sEcho;
$this->result['aaData'] = array();
if (count($this->media) == 0) {
return;
}
$count = 0;
foreach ($this->media as $aRow) {
$row = array();
$row[] = '<input type="checkbox" name="id[]" value="' . $aRow['pk_i_id'] . '" />';
$row[] = '<div id="media_list_pic"><img src="' . osc_apply_filter('resource_path', osc_base_url() . $aRow['s_path']) . $aRow['pk_i_id'] . '_thumbnail.' . $aRow['s_extension'] . '" style="max-width: 60px; max-height: 60px;" /></div> <div id="media_list_filename">' . $aRow['s_content_type'];
$row[] = '<a onclick="javascript:return confirm(\'' . osc_esc_js(__('This action can not be undone. Are you sure you want to continue?')) . '\')" href="' . osc_admin_base_url(true) . '?page=media&action=delete&id[]=' . $aRow['pk_i_id'] . '" id="dt_link_delete">' . __('Delete') . '</a>';
$row[] = '<a target="_blank" href="' . osc_item_url_ns($aRow['fk_i_item_id']) . '">item #' . $aRow['fk_i_item_id'] . '</a>';
$row[] = $aRow['dt_pub_date'];
$count++;
$this->result['aaData'][] = $row;
}
}
开发者ID:randomecho,项目名称:OSClass,代码行数:21,代码来源:media_processing.php
示例14: osc_base_url
$.getJSON(
"<?php
echo osc_base_url(true);
?>
?page=ajax&action=check_username_availability",
{"s_username": $("#s_username").attr("value")},
function(data){
clearInterval(cInterval);
if(data.exists==0) {
$("#available").text('<?php
echo osc_esc_js(__("The username is available", "modern"));
?>
');
} else {
$("#available").text('<?php
echo osc_esc_js(__("The username is NOT available", "modern"));
?>
');
}
}
);
}, 1000);
}
});
});
</script>
</head>
<body>
<?php
osc_current_web_theme_path('header.php');
开发者ID:jmcclenon,项目名称:Osclass,代码行数:31,代码来源:user-change_username.php
示例15: customHead
//.........这里部分代码省略.........
},
rewrite_user_alerts: {
required: true,
minlength: 1
},
rewrite_user_recover: {
required: true,
minlength: 1
},
rewrite_user_forgot: {
required: true,
minlength: 1
},
rewrite_user_change_password: {
required: true,
minlength: 1
},
rewrite_user_change_email: {
required: true,
minlength: 1
},
rewrite_user_change_username: {
required: true,
minlength: 1
},
rewrite_user_change_email_confirm: {
required: true,
minlength: 1
}
},
messages: {
rewrite_item_url: {
required: '<?php
echo osc_esc_js(__("Listings url: this field is required"));
?>
.',
minlength: '<?php
echo osc_esc_js(__("Listings url: this field is required"));
?>
.'
},
rewrite_page_url: {
required: '<?php
echo osc_esc_js(__("Page url: this field is required"));
?>
.',
minlength: '<?php
echo osc_esc_js(__("Page url: this field is required"));
?>
.'
},
rewrite_cat_url: {
required: '<?php
echo osc_esc_js(__("Categories url: this field is required"));
?>
.',
minlength: '<?php
echo osc_esc_js(__("Categories url: this field is required"));
?>
.'
},
rewrite_search_url: {
required: '<?php
echo osc_esc_js(__("Search url: this field is required"));
?>
.',
开发者ID:jmcclenon,项目名称:Osclass,代码行数:67,代码来源:permalinks.php
示例16: osc_base_url
$.getJSON(
"<?php
echo osc_base_url(true);
?>
?page=ajax&action=check_username_availability",
{"s_username": $("#s_username").attr("value")},
function(data){
clearInterval(cInterval);
if(data.exists==0) {
$("#available").text('<?php
echo osc_esc_js(__("The username is available", "bender"));
?>
');
} else {
$("#available").text('<?php
echo osc_esc_js(__("The username is NOT available", "bender"));
?>
');
}
}
);
}, 1000);
}
});
});
</script>
<div class="form-container form-horizontal">
<div class="resp-wrapper">
<ul id="error_list"></ul>
<form action="<?php
开发者ID:mylastof,项目名称:os-class,代码行数:31,代码来源:user-change_username.php
示例17: customHead
function customHead()
{
?>
<script type="text/javascript">
$(document).ready(function(){
// Code for form validation
$("form[name=settings_form]").validate({
rules: {
pageTitle: {
required: true,
minlength: 1
},
contactEmail: {
required: true,
email: true
},
num_rss_items: {
required: true,
digits: true
},
max_latest_items_at_home: {
required: true,
digits: true
},
default_results_per_page: {
required: true,
digits: true
}
},
messages: {
pageTitle: {
required: '<?php
echo osc_esc_js(__("Page title: this field is required"));
?>
.',
minlength: '<?php
echo osc_esc_js(__("Page title: this field is required"));
?>
.'
},
contactEmail: {
required: '<?php
echo osc_esc_js(__("Email: this field is required"));
?>
.',
email: '<?php
echo osc_esc_js(__("Invalid email address"));
?>
.'
},
num_rss_items: {
required: '<?php
echo osc_esc_js(__("Listings shown in RSS feed: this field is required"));
?>
.',
digits: '<?php
echo osc_esc_js(__("Listings shown in RSS feed: this field must only contain numeric characters"));
?>
.'
},
max_latest_items_at_home: {
required: '<?php
echo osc_esc_js(__("Latest listings shown: this field is required"));
?>
.',
digits: '<?php
echo osc_esc_js(__("Latest listings shown: this field must only contain numeric characters"));
?>
.'
},
default_results_per_page: {
required: '<?php
echo osc_esc_js(__("The search page shows: this field is required"));
?>
.',
digits: '<?php
echo osc_esc_js(__("The search page shows: this field must only contain numeric characters"));
?>
.'
}
},
wrapper: "li",
errorLabelContainer: "#error_list",
invalidHandler: function(form, validator) {
$('html,body').animate({ scrollTop: $('h1').offset().top }, { duration: 250, easing: 'swing'});
},
submitHandler: function(form){
$('button[type=submit], input[type=submit]').attr('disabled', 'disabled');
form.submit();
}
});
$("#market_disconnect").on('click', function() {
var x = confirm('<?php
_e('You are going to be disconnected from the Market, all your plugins and themes downloaded will remain installed and configured but you will not be able to update or download new plugins and themes. Are you sure?');
?>
');
if(x) {
window.location = '<?php
echo osc_admin_base_url(true);
//.........这里部分代码省略.........
开发者ID:oanav,项目名称:closetshare,代码行数:101,代码来源:index.php
示例18: osc_base_url
$(".sub_button").click(function(){
$.post('<?php
echo osc_base_url(true);
?>
', {email:$("#alert_email").val(), userid:$("#alert_userId").val(), alert:$("#alert").val(), page:"ajax", action:"alerts"},
function(data){
if(data==1) { swal('<?php
echo osc_esc_js(__('You have sucessfully subscribed to the alert', 'pop'));
?>
'); }
else if(data==-1) { swal('<?php
echo osc_esc_js(__('Invalid email address', 'pop'));
?>
'); }
else { swal('<?php
echo osc_esc_js(__('Could not subscribe to this alert', 'pop'));
?>
');
};
});
return false;
});
});
</script>
<div class="alert_form">
<h3>
<strong><?php
_e('Subscribe to this search', 'pop');
?>
</strong>
开发者ID:oanav,项目名称:closetshare,代码行数:31,代码来源:inc.alert.form.php
示例19: osc_admin_base_url
echo osc_admin_base_url(true);
?>
?page=ajax&action=check_market",
{"code" : $(this).attr('href').replace('#','')},
function(data){
if(data!=null) {
$("#market_thumb").attr('src',data.s_thumbnail);
$("#market_code").attr("value", data.s_slug);
$("#market_name").html(data.s_title);
$("#market_version").html(data.s_version);
$("#market_author").html(data.s_contact_name);
$("#market_url").attr('href',data.s_source_file);
$('#market_installer').dialog({
modal:true,
title: '<?php
echo osc_esc_js(__('Osclass Market'));
?>
',
width:485
});
}
}
);
return false;
});
</script>
</div>
<!-- /themes list -->
<?php
osc_current_admin_theme_path('parts/footer.php');
开发者ID:jmcclenon,项目名称:Osclass,代码行数:31,代码来源:add.php
示例20: osc_category_id
$('.iframe-category').remove();
});
$(".jsMessage p").attr('class', 'ok');
message += ret.msg;
$('.iframe-category').parent().parent().find('.name').html(ret.text);
} else {
$(".jsMessage p").attr('class', 'error');
message += ret.msg;
}
$(".jsMessage").fadeIn("fast");
$(".jsMessage p").html(message);
$('div.content_list_<?php
echo osc_category_id();
?>
').html('');
},
error: function(){
$(".jsMessage").fadeIn("fast");
$(".jsMessage p").attr('class', '');
$(".jsMessage p").html('<?php
echo osc_esc_js(__('Ajax error, please try again.'));
?>
');
}
})
return false;
});
oscTab();
});
</script>
开发者ID:jmcclenon,项目名称:Osclass,代码行数:31,代码来源:iframe.php
注:本文中的osc_esc_js函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论