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


PHP html::js_string方法代码示例

本文整理汇总了PHP中html::js_string方法的典型用法代码示例。如果您正苦于以下问题:PHP html::js_string方法的具体用法?PHP html::js_string怎么用?PHP html::js_string使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在html的用法示例。


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

示例1: if

      $(".g-progress-bar").progressbar("value", 100);
    } else if (current_value != target_value || delta != 1) {
      var new_value = Math.min(current_value + delta, target_value);
      $(".g-progress-bar").progressbar("value", new_value);
      animation = setTimeout(function() { animate_progress_bar(target_value); }, 100);
    } else {
      animation = null;
      delta = 1;
    }
    $.fn.gallery_hover_init();
  }

  update = function() {
    $.ajax({
      url: <?php 
echo html::js_string(url::site("admin/maintenance/run/{$task->id}?csrf={$csrf}"));
?>
,
      dataType: "json",
      success: function(data) {
        target_value = data.task.percent_complete;
        if (!animation) {
          animate_progress_bar();
        }
        $("#g-status").html("" + data.task.status);
        if (data.task.done) {
          $("#g-pause-button").hide();
          $("#g-done-button").show();
        } else {
          setTimeout(update, 100);
        }
开发者ID:brocki,项目名称:gallery3,代码行数:31,代码来源:admin_maintenance_task.html.php

示例2: del

echo html::js_string(url::site("admin/comments/delete/__ID__?csrf={$csrf}"));
?>
;

  function del(id) {
    $.get(delete_url.replace("__ID__", id),
          {},
          function() {
            $("#g-comment-" + id).slideUp();
            update_menu();
          });
  }

  function update_menu() {
    $.get(<?php 
echo html::js_string(url::site("admin/comments/menu_labels"));
?>
, {},
          function(data) {
            for (var i = 0; i < data.length; i++) {
              $("#g-admin-comments-menu li:eq(" + i + ") a").html(data[i]);
            }
          },
          "json");
  }
</script>

<div id="g-admin-comments">
  <h1> <?php 
echo t("Manage Comments");
?>
开发者ID:estebandito,项目名称:gallery3,代码行数:31,代码来源:admin_comments.html.php

示例3: defined

<?php

defined("SYSPATH") or die("No direct script access.");
?>
<script type="text/javascript">
  $(document).ready(function() {
    $(".g-available .g-block").equal_heights();
    select_toolkit = function(el) {
      if (!$(this).hasClass("g-unavailable")) {
        window.location = <?php 
echo html::js_string(url::site("admin/graphics/choose/__TK__?csrf={$csrf}"));
?>
          .replace("__TK__", $(this).attr("id"));
      }
    };
    $("#g-admin-graphics div.g-available .g-block").click(select_toolkit);
  });
</script>

<div id="g-admin-graphics" class="g-block ui-helper-clearfix">
  <h1> <?php 
echo t("Graphics settings");
?>
 </h1>
  <p>
    <?php 
echo t("Gallery needs a graphics toolkit in order to manipulate your photos.  Please choose one from the list below.");
?>
    <?php 
echo t("Can't decide which toolkit to choose?  <a href=\"%url\">We can help!</a>", array("url" => "http://codex.gallery2.org/Gallery3:Choosing_A_Graphics_Toolkit"));
?>
开发者ID:JasonWiki,项目名称:docs,代码行数:31,代码来源:admin_graphics.html.php

示例4: t

           class="g-button ui-state-default ui-corner-all"><?php 
echo t("Copy source text");
?>
</a>
      </form>
    </div>
  </div>
  <script type="text/javascript">
    var MSG_TRANSLATE_TEXT = <?php 
echo t("Translate text")->for_js();
?>
;
    var l10n_client_data = <?php 
echo json_encode($string_list);
?>
;
    var plural_forms = <?php 
echo json_encode($plural_forms);
?>
;
    var toggle_l10n_mode_url = <?php 
echo html::js_string(url::site("l10n_client/toggle_l10n_mode"));
?>
;
    var csrf = <?php 
echo html::js_string(access::csrf_token());
?>
;
  </script>
</div>
开发者ID:ChrisRut,项目名称:gallery3,代码行数:30,代码来源:l10n_client.html.php

示例5: defined

defined("SYSPATH") or die("No direct script access.");
?>
<script type="text/javascript">
  $("document").ready(function() {
    // using JS for adding link titles to avoid running t() for each tag
    $("#g-page-admin .g-page-name").attr("title", <?php 
echo t("Click to edit this page")->for_js();
?>
);
    $("#g-page-admin .g-delete-link").attr("title", $(".g-delete-link:first span").html());

    // In-place editing for tag admin
    $(".g-editable").gallery_in_place_edit({
      form_url: <?php 
echo html::js_string(url::site("admin/pages/form_rename/__ID__"));
?>
    });
  });
</script>

<?php 
$pages_per_column = $pages->count() / 5;
$column_page_count = 0;
?>

<div class="g-block">
  <h1> <?php 
echo t("Manage pages");
?>
 </h1>
开发者ID:qboy1987,项目名称:mooiyou,代码行数:30,代码来源:admin_pages.html.php

示例6: defined

<?php

defined("SYSPATH") or die("No direct script access.");
echo form::dropdown("g-select-session-locale", $installed_locales, $selected);
?>
<script type="text/javascript">
  $("select[name=g-select-session-locale]").change(function() {
    var old_locale_preference = <?php 
echo html::js_string($selected);
?>
;
    var locale = $(this).val();
    if (old_locale_preference == locale) {
      return;
    }

    var expires = -1;
    if (locale) {
      expires = 365;
    }
    $.cookie("g_locale", locale, {"expires": expires, "path": "/"});
    window.location.reload(true);
  });
</script>

开发者ID:JasonWiki,项目名称:docs,代码行数:24,代码来源:user_languages_block.html.php

示例7: defined

<?php

defined("SYSPATH") or die("No direct script access.");
?>

<? if (access::can("view_full", $theme->item())): ?>
<!-- Use javascript to show the full size as an overlay on the current page -->
<script type="text/javascript">
  $(document).ready(function() {
    $(".g-fullsize-link").click(function() {
      $.gallery_show_full_size(<?php 
echo html::js_string($theme->item()->file_url());
?>
, "<?php 
echo $theme->item()->width;
?>
", "<?php 
echo $theme->item()->height;
?>
");
      return false;
    });
  });
</script>
<? endif ?>

<div id="g-item">
  <?php 
echo $theme->photo_top();
?>
开发者ID:ChrisRut,项目名称:gallery3,代码行数:30,代码来源:photo.html.php

示例8: function

    if (this.checked) {
      $("input[type='radio'][value='" + this.value + "']").enable();
    } else {
      if ($("input[type='radio'][value='" + this.value + "']").selected()) { // if you deselect your default language, switch to some other installed language
        $("input[type='radio'][value='" + old_default_locale + "']").attr("checked", "checked");
      }
      $("input[type='radio'][value='" + this.value + "']").attr("disabled", "disabled");
    }
  });

  $("g-languages-form").ajaxForm({
    dataType: "json",
    success: function(data) {
      if (data.result == "success") {
        el = $('<a href="' + <?php 
echo html::js_string(url::site("admin/maintenance/start/gallery_task::update_l10n?csrf={$csrf}"));
?>
 + '"></a>'); // this is a little hack to trigger the update_l10n task in a dialog
        el.gallery_dialog();
        el.trigger('click');
      }
    }
  });
</script>

<div class="g-block">
  <h1> <?php 
echo t("Languages and Translation");
?>
 </h1>
开发者ID:CardinS2U,项目名称:gallery3,代码行数:30,代码来源:admin_languages.html.php

示例9: defined

<?php

defined("SYSPATH") or die("No direct script access.");
?>
<script type="text/javascript">
  update_blocks = function() {
    $.get(<?php 
echo html::js_string(url::site("admin/dashboard/reorder"));
?>
,
          {"csrf": "<?php 
echo $csrf;
?>
",
           "dashboard_center[]": $("#g-admin-dashboard").sortable(
             "toArray", {attribute: "block_id"}),
           "dashboard_sidebar[]": $("#g-admin-dashboard-sidebar").sortable(
             "toArray", {attribute: "block_id"})});
  };

  $(document).ready(function(){
    $("#g-admin-dashboard .g-block .ui-widget-header").addClass("g-draggable");
    $("#g-admin-dashboard").sortable({
      connectWith: ["#g-admin-dashboard-sidebar"],
      cursor: "move",
      handle: $(".ui-widget-header"),
      opacity: 0.6,
      placeholder: "g-target",
      stop: update_blocks
    });
开发者ID:JasonWiki,项目名称:docs,代码行数:30,代码来源:admin_dashboard.html.php

示例10: t

    $("#gTagAdmin .delete-link").attr("title", $(".delete-link:first span").html());

    // In-place editing for tag admin
    $(".gEditable").bind("click", editInPlace);
  });
  // make some values available within tag.js
  var csrf_token = "<?php 
echo $csrf;
?>
";
  var save_i18n = <?php 
echo html::js_string(t("save")->for_html_attr());
?>
;
  var cancel_i18n = <?php 
echo html::js_string(t("cancel")->for_html_attr());
?>
;
</script>
<div class="gBlock">
  <h2>
    <?php 
echo t("Tag Admin");
?>
  </h2>

  <?php 
$tags_per_column = $tags->count() / 5;
?>
  <?php 
$column_tag_count = 0;
开发者ID:Okat,项目名称:gallery3,代码行数:31,代码来源:admin_tags.html.php

示例11: t

echo html::js_string(ini_get("upload_max_filesize") ? num::convert_to_bytes(ini_get("upload_max_filesize")) . "B" : "100MB");
?>
,
    file_types: "*.gif;*.jpg;*.jpeg;*.png;*.flv;*.mp4;*.GIF;*.JPG;*.JPEG;*.PNG;*.FLV;*.MP4",
    file_types_description: <?php 
echo t("Photos and Movies")->for_js();
?>
,
    file_upload_limit: 1000,
    file_queue_limit: 0,
    custom_settings: { },
    debug: false,

    // Button settings
    button_image_url: <?php 
echo html::js_string(url::file("themes/default/images/select-photos-backg.png"));
?>
,
    button_width: "202",
    button_height: "45",
    button_placeholder_id: "gChooseFilesButtonPlaceholder",
    button_text: <?php 
echo json_encode('<span class="swfUploadFont">' . t("Select photos...") . '</span>');
?>
,
    button_text_style: ".swfUploadFont { color: #2E6E9E; font-size: 16px; font-family: Lucida Grande,Lucida Sans,Arial,sans-serif; font-weight: bold; }",
    button_text_left_padding: 30,
    button_text_top_padding: 10,

    // The event handler functions are defined in handlers.js
    file_queued_handler: file_queued,
开发者ID:Okat,项目名称:gallery3,代码行数:31,代码来源:simple_uploader.html.php

示例12: js_string_test

 public function js_string_test()
 {
     $string = html::js_string("hello's <p  >world</p>");
     $this->assert_equal('"hello\'s <p  >world<\\/p>"', $string);
 }
开发者ID:Joe7,项目名称:gallery3,代码行数:5,代码来源:Html_Helper_Test.php

示例13: animate_progress_bar

          animate_progress_bar();
        }
        $("#g-status").html("" + data.status);
        if (data.done) {
          dismiss();
        } else {
          setTimeout(update, 100);
        }
      }
    });
  }
  $(".g-progress-bar").progressbar({value: 0});
  update();
  dismiss = function() {
    window.location = <?php 
echo html::js_string(url::site("admin/themes"));
?>
;
  }
</script>
<div id="g-progress">
</div>
  <h1> <?php 
echo $task->name;
?>
 </h1>
  <div class="g-progress-bar"></div>
  <div id="g-status">
    <?php 
echo t("Starting up...");
?>
开发者ID:webmatter,项目名称:gallery3-contrib,代码行数:31,代码来源:admin_themeroller_progress.html.php

示例14: t

echo html::js_string(ini_get("upload_max_filesize") ? num::convert_to_bytes(ini_get("upload_max_filesize")) . "B" : "100MB");
?>
,
    file_types: "*.gif;*.jpg;*.jpeg;*.png;*.flv;*.mp4;*.GIF;*.JPG;*.JPEG;*.PNG;*.FLV;*.MP4",
    file_types_description: <?php 
echo t("Photos and Movies")->for_js();
?>
,
    file_upload_limit: 1000,
    file_queue_limit: 0,
    custom_settings: { },
    debug: false,

    // Button settings
    button_image_url: <?php 
echo html::js_string(url::file(gallery::find_file("images", "select-photos-backg.png")));
?>
,
    button_width: "202",
    button_height: "45",
    button_placeholder_id: "g-choose-files-placeholder",
    button_text: <?php 
echo json_encode('<span class="swfUploadFont">' . t("Select photos...") . '</span>');
?>
,
    button_text_style: ".swfUploadFont { color: #2E6E9E; font-size: 16px; font-family: Lucida Grande,Lucida Sans,Arial,sans-serif; font-weight: bold; }",
    button_text_left_padding: 30,
    button_text_right_padding: 30,
    button_text_top_padding: 10,

    // The event handler functions are defined in handlers.js
开发者ID:estebandito,项目名称:gallery3,代码行数:31,代码来源:simple_uploader.html.php

示例15: t

<li class="ui-icon-left">
  <span class="ui-icon ui-icon-folder-open"></span>
  <span ondblclick="open_dir('')">
    <?php 
echo t("All");
?>
  </span>
  <ul>

    <?php 
foreach ($parents as $dir) {
    ?>
    <li class="ui-icon-left">
      <span class="ui-icon ui-icon-folder-open"></span>
      <span ondblclick='open_dir(<?php 
    echo html::js_string($dir);
    ?>
)'>
        <?php 
    echo html::clean(basename($dir));
    ?>
      </span>
      <ul>
        <?php 
}
?>

        <?php 
foreach ($files as $file) {
    ?>
        <li class="ui-icon-left">
开发者ID:Okat,项目名称:gallery3,代码行数:31,代码来源:server_add_tree.html.php


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