Commit df592e26 authored by Robert Lyon's avatar Robert Lyon Committed by Gerrit Code Review
Browse files

The journal blocktype 'new entry' button not working bug 1222599



- This was not working for tagged journal and recent journal blocktypes
clicking the button did not do anything.

- problem was a css variable expected by the js had been removed
so I added a new one that didn't clash with current css styles.

- Fixed this for when a user has only 1 journal or multiple journals

Change-Id: I19374c2c64bbf08f683871197b16e3ad37b1f6dd
Signed-off-by: Robert Lyon's avatarRobert Lyon <robertl@catalyst.net.nz>
parent b455b9e4
function addNewPostShortcut(blockid) {
forEach(
getElementsByTagAndClassName('a', 'shortcut', 'blockinstance_' + blockid),
getElementsByTagAndClassName('a', 'btnshortcut', 'blockinstance_' + blockid),
function(a) {
disconnectAll(a);
connect(a, 'onclick', function(e) {
......
......@@ -7,9 +7,9 @@
<option value="{$blog->id}"> {$blog->title} </option>
{/foreach}
</select>
<a class="btn">{str tag='shortcutgo' section='artefact.blog'}</a>
<a class="btn btnshortcut">{str tag='shortcutgo' section='artefact.blog'}</a>
</div>
<a class="btn{if (count($blogs) != 1)} hidden{/if}">{str tag='shortcutnewentry' section='artefact.blog'}</a>
<a class="btn btnshortcut{if (count($blogs) != 1)} hidden{/if}">{str tag='shortcutnewentry' section='artefact.blog'}</a>
</div>
{/if}
<ul class="recentblogpost">
......
function addNewTaggedPostShortcut(blockid) {
forEach(
getElementsByTagAndClassName('a', 'shortcut', 'blockinstance_' + blockid),
getElementsByTagAndClassName('a', 'btnshortcut', 'blockinstance_' + blockid),
function(a) {
disconnectAll(a);
connect(a, 'onclick', function(e) {
......
......@@ -4,9 +4,9 @@
<label class="text">{str tag='shortcutaddpost' section='artefact.blog'}</label>
<select id="blogselect_{$blockid}" class="select">{foreach from=$blogs item=blog}<option value="{$blog->id}"> {$blog->title} </option>{/foreach}</select>
<input class="select" type="hidden" value="{$tagselect}">
<a class="btn">{str tag='shortcutgo' section='artefact.blog'}</a>
<a class="btn btnshortcut">{str tag='shortcutgo' section='artefact.blog'}</a>
</div>
<a class="btn{if (count($blogs) != 1)} hidden{/if}">{str tag='shortcutnewentry' section='artefact.blog'}</a>
<a class="btn btnshortcut {if (count($blogs) != 1)} hidden{/if}">{str tag='shortcutnewentry' section='artefact.blog'}</a>
</div>
{/if}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment