Skip to content

Commit

Permalink
Version 0.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
tmcnab committed Oct 21, 2013
1 parent fe7eb89 commit ce0b481
Show file tree
Hide file tree
Showing 8 changed files with 105 additions and 168 deletions.
2 changes: 2 additions & 0 deletions App/Controllers/EditorViewController.js
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,8 @@ var EditorViewController = (function()
editors['#languageEditor'].getSession().setValue(activeDocument.language);
editors['#decoderPaneLeft'].getSession().setValue(activeDocument.ecmascript);

$('#exportPanePath').text("~/" + activeDocument.name + ".zip");

self.Present();
}

Expand Down
28 changes: 27 additions & 1 deletion App/Controllers/ModalViewController.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,34 @@ var ModalViewController = (function()
self.Init = function(){ }

self.Error = function(message){
alert(message);
$('#singleButtonModalView .modal-title').text('Error');
$('#singleButtonModalView .modal-body p').text(message);
$('#singleButtonModalView').modal('show');
}

self.Info = function (message) {
$('#singleButtonModalView .modal-title').text('Information');
$('#singleButtonModalView .modal-body p').text(message);
$('#singleButtonModalView').modal('show');
};

self.Confirm = function (message, fn, yesLabel, noLabel) {
yesLabel = yesLabel || "Confirm";
noLabel = noLabel || "Deny";

$('#cMVYesBtn').off().on('click', function() {
$('#confirmModalView').modal('hide');
fn(true);
}).text(yesLabel);

$('#cMVNoBtn').off().on('click', function() {
$('#confirmModalView').modal('hide');
fn(false);
}).text(noLabel);

$('#confirmModalView .modal-body p').text(message)
$('#confirmModalView').modal('show');
};

return self;
})();
9 changes: 8 additions & 1 deletion App/Controllers/ProjectsViewController.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,14 @@ var ProjectsViewController = (function()
var when = $('<span>').text(moment(doc.updated).fromNow()).addClass('pull-right');

var tdRemove = $('<td>').append($('<i>').addClass('icon-remove')).on('click', function (evt) {
ProjectsViewController.Remove(doc._id);
var message = "Are you sure you want to delete the " + doc.name + " project? This can't be undone.";
function handler(bool) {
if (bool) {
ProjectsViewController.Remove(doc._id);
}
}

ModalViewController.Confirm(message, handler, "Yes", "No");
}).css({
width: '1px',
cursor: 'pointer'
Expand Down
12 changes: 12 additions & 0 deletions Content/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,18 @@ body.modal-open {
margin-right: 0;
}

.modal-content {
border: 1px solid #282828;
}

.modal-body {
padding-bottom: 0;
}

.modal-body .form-group {
margin-bottom: 0;
}

/** GitHub Commits Widget CSS **/

#github-commits {
Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Hyperglot",
"version": "0.0.1",
"version": "0.1.0",
"homepage": "https://github.com/tmcnab/Hyperglot",
"authors": [
"Tristan McNab <[email protected]>"
Expand Down
170 changes: 9 additions & 161 deletions hgc/parser.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

48 changes: 45 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ <h3>Repo</h3>
<h3 class="panel-title">Compiler Creation</h3>
</div>
<div class="panel-body">
<p>The button below will create your compiler archive '~/hgc-compiler.zip'. After you unzip it, run 'npm install' to install the necessary dependencies.</p>
<p>The button below will create your compiler archive <span id="exportPanePath">'~/hgc-compiler.zip'</span>. After you unzip it, run 'npm install' to install the necessary dependencies.</p>
<p>Don't fret, there will be more options in the future.</p>
<hr />
<div class="text-center">
Expand All @@ -123,23 +123,65 @@ <h3 class="panel-title">Compiler Creation</h3>
</nav>
</div>

<!-- Modal Views -->

<form id="newProjectView" class="modal fade">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title">New Project</h4>
</div>
<div class="modal-body">
<div class="form-group">
<input type="text" class="form-control" name="npvName" placeholder="Project Name (required)" required />
</div>
</div>
<div class="modal-footer">
<div class="btn-group btn-group-justified">
<style scoped>button { width: 50%; }</style>
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
<button type="submit" class="btn btn-primary">Create</button>
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
</div>
</form>

<div id="singleButtonModalView" class="modal fade">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title"></h4>
</div>
<div class="modal-body">
<p></p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default btn-block">Okay</button>
</div>
</div>
</div>
</div>

<div id="confirmModalView" class="modal fade" data-backdrop="static" data-keyboard="false">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title">Confirm</h4>
</div>
<div class="modal-body">
<p>&nbsp;</p>
</div>
<div class="modal-footer">
<div class="btn-group btn-group-justified">
<style scoped>button { width: 50%; }</style>
<button id="cMVYesBtn" type="button" class="btn btn-primary">Confirm</button>
<button id="cMVNoBtn" type="button" class="btn btn-default">Deny</button>
</div>
</div>
</div>
</div>
</div>

</body>
</html>
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"window": {
"title": "Hyperglot",
"icon": "link.png",
"toolbar": true,
"toolbar": false,
"frame": true,
"width": 1000,
"height": 600,
Expand Down

0 comments on commit ce0b481

Please sign in to comment.