mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-03-01 18:29:16 +01:00
Updated AuthorsModel. Added utility script for generating QML ListElements of authors.
This commit is contained in:
parent
01309d50b5
commit
9683ddc37a
@ -0,0 +1,44 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>CREDITS Utility</title>
|
||||||
|
<!-- Bootstrap -->
|
||||||
|
<link href="https://dl.dropboxusercontent.com/u/11670/bootstrap/css/bootstrap.min.css" rel="stylesheet" media="screen">
|
||||||
|
<style>
|
||||||
|
body { margin: 40px;}
|
||||||
|
.hidden { display:none; }
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<h1>Author Dialog authorModel Utility</h1>
|
||||||
|
<p>This utility will parse a \n delimited list of names and generate ListElement components for entry into the QML model located in /qml/AuthorsModel.qml.</p>
|
||||||
|
<div class="output"></div>
|
||||||
|
<form onSubmit="javascript:handleForm($('.authors').val()); return false;">
|
||||||
|
<textarea class="authors" rows="30"></textarea>
|
||||||
|
<button type="submit" class="btn">Generate</button>
|
||||||
|
</form>
|
||||||
|
<script src="http://code.jquery.com/jquery-latest.js"></script>
|
||||||
|
<script src="https://dl.dropboxusercontent.com/u/11670/bootstrap/js/bootstrap.min.js"></script>
|
||||||
|
<script>
|
||||||
|
function handleForm(str){
|
||||||
|
console.log(str);
|
||||||
|
|
||||||
|
var lines = str.split(/\n/);
|
||||||
|
var texts = [];
|
||||||
|
$('<div class="alert-block alert-info"><strong>Instructions: </strong>Cut/Paste the ListElements below into /qml/AuthorsModel.qml</div><br>').appendTo('.output');
|
||||||
|
for (var i=0; i < lines.length; i++) {
|
||||||
|
// only push this line if it contains a non whitespace character.
|
||||||
|
if (/\S/.test(lines[i])) {
|
||||||
|
texts.push($.trim(lines[i]));
|
||||||
|
}
|
||||||
|
//Make string to append to output
|
||||||
|
var listelement = '<p>ListElement { name: "' + texts[i] + '" }</p>';
|
||||||
|
$(listelement).appendTo('.output');
|
||||||
|
}
|
||||||
|
$('button').detach();
|
||||||
|
$('.authors').detach();
|
||||||
|
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html
|
@ -69,6 +69,7 @@ Dr. Erhard Siegl
|
|||||||
Mike Smith
|
Mike Smith
|
||||||
Alex Sowa
|
Alex Sowa
|
||||||
Pete Stapley
|
Pete Stapley
|
||||||
|
Vova Starikh
|
||||||
Rowan Taubitz
|
Rowan Taubitz
|
||||||
Andrew Thoms
|
Andrew Thoms
|
||||||
Jasper van Loenen
|
Jasper van Loenen
|
||||||
@ -79,6 +80,7 @@ Brian Webb
|
|||||||
Justin Welander
|
Justin Welander
|
||||||
Mat Wellington
|
Mat Wellington
|
||||||
Kendal Wells
|
Kendal Wells
|
||||||
|
David Willis
|
||||||
Dmitriy Zaitsev
|
Dmitriy Zaitsev
|
||||||
</pre>
|
</pre>
|
||||||
</body>
|
</body>
|
||||||
|
@ -130,6 +130,8 @@ ListModel {
|
|||||||
ListElement{ name:"Alex Sowa" }
|
ListElement{ name:"Alex Sowa" }
|
||||||
|
|
||||||
ListElement{ name:"Pete Stapley" }
|
ListElement{ name:"Pete Stapley" }
|
||||||
|
|
||||||
|
ListElement{ name:"Vova Starikh" }
|
||||||
|
|
||||||
ListElement{ name:"Rowan Taubitz" }
|
ListElement{ name:"Rowan Taubitz" }
|
||||||
|
|
||||||
@ -151,5 +153,7 @@ ListModel {
|
|||||||
|
|
||||||
ListElement{ name:"Kendal Wells" }
|
ListElement{ name:"Kendal Wells" }
|
||||||
|
|
||||||
|
ListElement { name: "David Willis" }
|
||||||
|
|
||||||
ListElement{ name:"Dmitriy Zaitsev" }
|
ListElement{ name:"Dmitriy Zaitsev" }
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user