Various JS optimizations
This commit is contained in:
parent
20022ea4ab
commit
aa37ee66ff
7 changed files with 14 additions and 15 deletions
|
@ -206,7 +206,7 @@ function extractLast(term)
|
||||||
|
|
||||||
$(function()
|
$(function()
|
||||||
{
|
{
|
||||||
$('[data-autocomplete-url]').each(function()
|
$('.autocomplete').each(function()
|
||||||
{
|
{
|
||||||
var searchInput = $(this);
|
var searchInput = $(this);
|
||||||
searchInput
|
searchInput
|
||||||
|
@ -288,9 +288,3 @@ $(function()
|
||||||
Mousetrap.bind('d', function() { var url = $('.paginator:visible .next:not(.disabled) a').attr('href'); if (typeof url !== 'undefined') window.location.href = url; }, 'keyup');
|
Mousetrap.bind('d', function() { var url = $('.paginator:visible .next:not(.disabled) a').attr('href'); if (typeof url !== 'undefined') window.location.href = url; }, 'keyup');
|
||||||
Mousetrap.bind('p', function() { $('.post a').eq(0).focus(); return false; }, 'keyup');
|
Mousetrap.bind('p', function() { $('.post a').eq(0).focus(); return false; }, 'keyup');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
$(function()
|
|
||||||
{
|
|
||||||
$('body').trigger('dom-update');
|
|
||||||
});
|
|
||||||
|
|
|
@ -34,5 +34,4 @@ $(function()
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
$('body').trigger('dom-update');
|
|
||||||
});
|
});
|
||||||
|
|
|
@ -52,7 +52,6 @@ function onDomUpdate()
|
||||||
$(function()
|
$(function()
|
||||||
{
|
{
|
||||||
$('body').bind('dom-update', onDomUpdate);
|
$('body').bind('dom-update', onDomUpdate);
|
||||||
onDomUpdate();
|
|
||||||
|
|
||||||
$('form.edit-post').submit(function(e)
|
$('form.edit-post').submit(function(e)
|
||||||
{
|
{
|
||||||
|
|
|
@ -87,7 +87,7 @@
|
||||||
|
|
||||||
<li class="search">
|
<li class="search">
|
||||||
<form name="search" action="<?php echo \Chibi\UrlHelper::route('post', 'list') ?>" method="get">
|
<form name="search" action="<?php echo \Chibi\UrlHelper::route('post', 'list') ?>" method="get">
|
||||||
<input type="search" name="query" placeholder="Search…" value="<?php echo isset($this->context->transport->searchQuery) ? htmlspecialchars($this->context->transport->searchQuery) : '' ?>" data-autocomplete-url="<?php echo \Chibi\UrlHelper::route('tag', 'list') ?>"/>
|
<input class="autocomplete" type="search" name="query" placeholder="Search…" value="<?php echo isset($this->context->transport->searchQuery) ? htmlspecialchars($this->context->transport->searchQuery) : '' ?>" data-autocomplete-url="<?php echo \Chibi\UrlHelper::route('tag', 'list') ?>"/>
|
||||||
</form>
|
</form>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
@ -121,5 +121,12 @@
|
||||||
<?php endif ?>
|
<?php endif ?>
|
||||||
</div>
|
</div>
|
||||||
</footer>
|
</footer>
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
$(function()
|
||||||
|
{
|
||||||
|
$('body').trigger('dom-update');
|
||||||
|
});
|
||||||
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -3,12 +3,12 @@
|
||||||
<h1>mass tag</h1>
|
<h1>mass tag</h1>
|
||||||
<div>
|
<div>
|
||||||
<label class="left" for="mass-tag-query">Search query:</label>
|
<label class="left" for="mass-tag-query">Search query:</label>
|
||||||
<div class="input-wrapper"><input type="text" name="query" id="mass-tag-query" value="<?php echo isset($this->context->massTagQuery) ? $this->context->massTagQuery : '' ?>" data-autocomplete-url="<?php echo \Chibi\UrlHelper::route('tag', 'list') ?>"/></div>
|
<div class="input-wrapper"><input class="autocomplete" type="text" type="text" name="query" id="mass-tag-query" value="<?php echo isset($this->context->massTagQuery) ? $this->context->massTagQuery : '' ?>" data-autocomplete-url="<?php echo \Chibi\UrlHelper::route('tag', 'list') ?>"/></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<label class="left" for="mass-tag-tag">Tag:</label>
|
<label class="left" for="mass-tag-tag">Tag:</label>
|
||||||
<div class="input-wrapper"><input type="text" name="tag" id="mass-tag-tag" value="<?php echo isset($this->context->massTagTag) ? $this->context->massTagTag : '' ?>" data-autocomplete-url="<?php echo \Chibi\UrlHelper::route('tag', 'list') ?>"/></div>
|
<div class="input-wrapper"><input class="autocomplete" type="text" type="text" name="tag" id="mass-tag-tag" value="<?php echo isset($this->context->massTagTag) ? $this->context->massTagTag : '' ?>" data-autocomplete-url="<?php echo \Chibi\UrlHelper::route('tag', 'list') ?>"/></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<input type="hidden" name="submit" value="1"/>
|
<input type="hidden" name="submit" value="1"/>
|
||||||
|
|
|
@ -3,12 +3,12 @@
|
||||||
<h1>merge tags</h1>
|
<h1>merge tags</h1>
|
||||||
<div>
|
<div>
|
||||||
<label class="left" for="merge-source-tag">Source tag:</label>
|
<label class="left" for="merge-source-tag">Source tag:</label>
|
||||||
<div class="input-wrapper"><input type="text" name="source-tag" id="merge-source-tag" data-autocomplete-url="<?php echo \Chibi\UrlHelper::route('tag', 'list') ?>"/></div>
|
<div class="input-wrapper"><input class="autocomplete" type="text" type="text" name="source-tag" id="merge-source-tag" data-autocomplete-url="<?php echo \Chibi\UrlHelper::route('tag', 'list') ?>"/></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<label class="left" for="merge-target-tag">Target tag:</label>
|
<label class="left" for="merge-target-tag">Target tag:</label>
|
||||||
<div class="input-wrapper"><input type="text" name="target-tag" id="merge-target-tag" data-autocomplete-url="<?php echo \Chibi\UrlHelper::route('tag', 'list') ?>"/></div>
|
<div class="input-wrapper"><input class="autocomplete" type="text" name="target-tag" id="merge-target-tag" data-autocomplete-url="<?php echo \Chibi\UrlHelper::route('tag', 'list') ?>"/></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<input type="hidden" name="submit" value="1"/>
|
<input type="hidden" name="submit" value="1"/>
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
<h1>rename tags</h1>
|
<h1>rename tags</h1>
|
||||||
<div>
|
<div>
|
||||||
<label class="left" for="rename-source-tag">Source tag:</label>
|
<label class="left" for="rename-source-tag">Source tag:</label>
|
||||||
<div class="input-wrapper"><input type="text" name="source-tag" id="rename-source-tag" data-autocomplete-url="<?php echo \Chibi\UrlHelper::route('tag', 'list') ?>"/></div>
|
<div class="input-wrapper"><input class="autocomplete" type="text" type="text" name="source-tag" id="rename-source-tag" data-autocomplete-url="<?php echo \Chibi\UrlHelper::route('tag', 'list') ?>"/></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
|
|
Loading…
Reference in a new issue