srchub-old

srchub-old Commit Details


Date:2013-08-01 22:28:00 (11 years 4 months ago)
Author:Natalie Adams
Branch:default
Commit:60c6cf57da73
Parents: b16f77b940b5
Message:Adding the ability to add tabs to documentation and issue editing

Adding the ability to have syntax highlighted wiki (ie documentation)
ex:

<pre class="prettyprint">
int main()
{
cout << "test" << endl;
}
</pre>
Changes:
Aindefero/www/media/idf/js/allowtabs.js (full)
Mindefero/src/IDF/Views/User.php (2 diffs)
Mindefero/src/IDF/templates/idf/source/git/file.html (2 diffs)
Mindefero/src/IDF/templates/idf/source/mercurial/file.html (2 diffs)
Mindefero/src/IDF/templates/idf/source/svn/file.html (2 diffs)

File differences

indefero/src/IDF/Views/User.php
281281
282282
283283
284
285
286
287
288
289
290
284291
285292
286293
......
291298
292299
293300
294
301
295302
296303
297304
$user = $users[0];
$user_data = IDF_UserData::factory($user);
$otags = array();
// Note that this approach does not scale, we will need to add
// a table to cache the meaning of the tags for large forges.
foreach (IDF_Views::getProjects($user) as $project) {
$otags = array_merge($otags, $project->getTagIdsByStatus('open'));
}
$false = Pluf_DB_BooleanToDb(false, $db);
$sql_results = $db->select(
'SELECT id FROM '.$db->pfx.'idf_projects '.
foreach ($sql_results as $id) {
$ids[] = $id['id'];
}
$f_sql = new Pluf_SQL('owner=%s AND project IN (' . implode(', ', $ids) . ' )', array($user->id));
$f_sql = new Pluf_SQL('owner=%s AND status IN (' .implode(', ', $otags) . ') AND project IN (' . implode(', ', $ids) . ' )', array($user->id));
$pag = new Pluf_Paginator(new IDF_Issue());
$pag->class = 'recent-issues';
indefero/src/IDF/templates/idf/source/git/file.html
11
2
2
33
44
55
......
2626
2727
2828
29
30
29
3130
{extends "idf/source/base.html"}
{block extraheader}<link rel="stylesheet" type="text/css" href="{media '/idf/css/prettify.css'}" />{/block}
{block extraheader} {/block}
{block docclass}yui-t1{assign $inSourceTree=true}{/block}
{block body}
<h2 class="top"><a href="{url 'IDF_Views_Source::treeBase', array($project.shortname, $commit)}">{trans 'Root'}</a><span class="sep">/</span>{if $breadcrumb}{$breadcrumb|safe}{/if}</h2>
{/block}
{block javascript}
<script type="text/javascript" src="{media '/idf/js/prettify.js'}"></script>
<script type="text/javascript">prettyPrint();</script>
{/block}
indefero/src/IDF/templates/idf/source/mercurial/file.html
11
2
2
33
44
55
......
2727
2828
2929
30
31
30
3231
{extends "idf/source/base.html"}
{block extraheader}<link rel="stylesheet" type="text/css" href="{media '/idf/css/prettify.css'}" />{/block}
{block extraheader} {/block}
{block docclass}yui-t1{assign $inSourceTree=true}{/block}
{block body}
{/block}
{block javascript}
<script type="text/javascript" src="{media '/idf/js/prettify.js'}"></script>
<script type="text/javascript">prettyPrint();</script>
{/block}
indefero/src/IDF/templates/idf/source/svn/file.html
11
2
2
33
44
55
......
4343
4444
4545
46
47
46
4847
{extends "idf/source/base.html"}
{block extraheader}<link rel="stylesheet" type="text/css" href="{media '/idf/css/prettify.css'}" />{/block}
{block extraheader} {/block}
{block docclass}yui-t1{assign $inSourceTree=true}{/block}
{block body}
<h2 class="top"><a href="{url 'IDF_Views_Source::treeBase', array($project.shortname, $commit)}">{trans 'Root'}</a><span class="sep">/</span>{if $breadcrumb}{$breadcrumb|safe}{/if}</h2>
{/block}
{block javascript}
<script type="text/javascript" src="{media '/idf/js/prettify.js'}"></script>
<script type="text/javascript">prettyPrint();</script>
{/block}
indefero/www/media/idf/js/allowtabs.js
1
2
3
4
5
6
7
8
9
10
11
$("textarea").keydown(function(e) {
var $this, end, start;
if (e.keyCode === 9) {
start = this.selectionStart;
end = this.selectionEnd;
$this = $(this);
$this.val($this.val().substring(0, start) + "\t" + $this.val().substring(end));
this.selectionStart = this.selectionEnd = start + 1;
return false;
}
});

Archive Download the corresponding diff file

Branches

Tags

Page rendered in 0.43457s using 14 queries.