Indefero

Indefero Commit Details


Date:2008-07-25 07:15:58 (16 years 4 months ago)
Author:Loic d'Anterroches
Branch:dev, develop, feature-issue_links, feature.better-home, feature.content-md5, feature.diff-whitespace, feature.download-md5, feature.issue-links, feature.issue-of-others, feature.issue-summary, feature.search-filter, feature.webrepos, feature.wiki-default-page, master, newdiff, release-1.1, release-1.2, release-1.3, svn
Commit:4eea3797b26cb3ab34c5b4e1b7ff5098f2284deb
Parents: e5d296d8638db9bd59a85360d80e126b901befeb
Message:Added the autocompletion of the owner and cosmetic changes.

Changes:

File differences

src/IDF/Views/Issue.php
181181
182182
183183
184
184
185
186
185187
186188
187189
......
334336
335337
336338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
337355
338356
339357
$issue = $form->save();
$url = Pluf_HTTP_URL_urlForView('IDF_Views_Issue::index',
array($prj->shortname));
$request->user->setMessage(sprintf(__('Issue %d has been updated.'), $issue->id));
$urlissue = Pluf_HTTP_URL_urlForView('IDF_Views_Issue::view',
array($prj->shortname, $issue->id));
$request->user->setMessage(sprintf(__('<a href="%s">Issue %d</a> has been updated.'), $urlissue, $issue->id));
return new Pluf_HTTP_Response_Redirect($url);
}
} else {
}
$auto[$key] = substr($auto[$key], 0, -1);
}
// Get the members/owners
$m = $project->getMembershipData();
$auto['_auto_owner'] = $m['members'];
$auto['auto_owner'] = '';
foreach ($m['owners'] as $owner) {
if (!Pluf_Model_InArray($owner, $auto['_auto_owner'])) {
$auto['_auto_owner'][] = $owner;
}
}
foreach ($auto['_auto_owner'] as $owner) {
$auto['auto_owner'] .= sprintf('{ name: "%s", to: "%s" }, ',
Pluf_esc($owner),
Pluf_esc($owner->login));
}
$auto['auto_owner'] = substr($auto['auto_owner'], 0, -1);
unset($auto['_auto_owner']);
return $auto;
}
}
src/IDF/templates/base.html
6767
6868
6969
70
71
72
73
74
75
76
77
78
79
80
7081
7182
<script type="text/javascript" src="{media '/idf/js/jquery-1.2.6.min.js'}"></script>
{include 'js-hotkeys.html'}
{block javascript}{/block}
{if $project}
<script type="text/javascript">{literal}
<!-- //
$(document).ready(function(){
var frag = location.hash;
if (frag.length > 3 && frag.substring(0, 3) == '#ic') {
$(frag).addClass("issue-comment-focus");
}
});
// -->{/literal}
</script>{/if}
</body>
</html>
src/IDF/templates/issues/js-autocomplete.html
1
12
23
34
......
56
67
78
9
810
911
1012
......
3436
3537
3638
39
40
41
42
43
44
45
46
47
48
49
50
51
3752
3853
3954
4055
56
{if $isOwner or $isMember}
<script type="text/javascript" src="{media '/idf/js/jquery.bgiframe.min.js'}"></script>
<script type="text/javascript" src="{media '/idf/js/jquery.autocomplete.min.js'}"></script>
<script type="text/javascript" charset="utf-8">
$(document).ready(function(){
var auto_labels = [{/literal}{$auto_labels|safe}{literal}];
var auto_status = [{/literal}{$auto_status|safe}{literal}];
var auto_owner = [{/literal}{$auto_owner|safe}{literal}];
var j=0;
for (j=1;j<7;j=j+1) {
$("#id_label"+j).autocomplete(auto_labels, {
return row.to;
}
});
$("#id_owner").autocomplete(auto_owner, {
minChars: 0,
width: 310,
matchContains: true,
max: 50,
highlightItem: false,
formatItem: function(row, i, max, term) {
return row.to.replace(new RegExp("(" + term + ")", "gi"), "<strong>$1</strong>") + " <span style='font-size: 80%;'>" + row.name + "</span>";
},
formatResult: function(row) {
return row.to;
}
});
});
{/literal} //-->
</script>
{/if}
src/IDF/templates/issues/view.html
1010
1111
1212
13
13
1414
1515
1616
{aurl 'url', 'IDF_Views_Issue::view', array($project.shortname, $issue.id)}
{assign $id = $c.id}
{assign $url = $url~'#ic'~$c.id}
<p>{blocktrans}Comment <a href="{$url}">{$id}</a> by {$who}, {$c.creation_dtime|date}{/blocktrans}</p>
<p>{blocktrans}Comment <a href="{$url}">{$i}</a> by {$who}, {$c.creation_dtime|date}{/blocktrans}</p>
{/if}
<p class="issue-comment-text">{if strlen($c.content) > 0}{$c.content|nl2br}{else}<i>{trans '(No comments were given for this change.)'}</i>{/if}</p>
src/IDF/templates/js-hotkeys.html
99
1010
1111
12
1312
{hotkey 'Shift+w', 'IDF_Views_Issue::myIssues', array($project.shortname, 'owner')}
{/if} //-->
</script>
{/if}
www/media/idf/css/style.css
126126
127127
128128
129
130
131
132
129133
130134
131135
padding: 0.5em;
}
.issue-comment-focus {
border-right: 3px solid #8ae234 !important;
}
div.issue-comment-first {
border-top: 1px solid #d3d7cf;
}

Archive Download the corresponding diff file

Page rendered in 0.09769s using 13 queries.