Skip to content
This repository has been archived by the owner on Dec 27, 2023. It is now read-only.

Commit

Permalink
Merge pull request #359 from smcgregor/gsoc-SplitImage
Browse files Browse the repository at this point in the history
Update gsoc-SplitImage to MVC architecture
  • Loading branch information
smcgregor committed Feb 26, 2016
2 parents 306a6b8 + 18db2e7 commit 0ab5172
Show file tree
Hide file tree
Showing 153 changed files with 12,101 additions and 3,843 deletions.
4 changes: 4 additions & 0 deletions .codeclimate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
exclude_paths:
- vendor/**/*
- ZeroBin/**/*
- tests/**/*
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@
*.swp
.idea
*~
test/sauce.json
test/node_modules/*
test/coverage
16 changes: 10 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,20 +22,24 @@ env:
- secure: XpyyEMPAvqtQIXap/dLAgl8JhAKfoSdsmoGY659eHZcijYv6d8pOX7JPUfwHhteoso/MkX9o+F8t7z7AIigNi0FJHQedP4cwhtbYEDFr8w4tRz9TYf7u4d/UUosVD4x95v9Yp+G84P/Rw6Vr90TgXExo4hVxJx2faNp9xkpMqE8=
#SAUCE_ACCESS_KEY=********-****-****-****-************(irdan/privly-applications)
- secure: gCbEFk/4uWMa41BFLLwHaoJebbZHpxIF6H2NCqiAYlVwAKB2Dzya9imwKzm6XUCXRyUakN8eaJBO9d9OQtRV+D2Uap7sUDGoAjeGgKQuGYpbSYgN8NQVAJdY+WeAeH4Ul4ExZOJKQH7AL6pFkCHn9m/RnXCosrOG+ob4fievJ8s=
#SAUCE_USERNAME=jatindhankhar(jatindhankhar/privly-applications)
- secure: kCjnbIfAAbSwAOZISCzsxsoI1DjDLPXzLwcDMCDSluJypfyxqoOrwBBs+u96wwHylr+lsYzEdAa+A7BWjlSzkYUwkCMRUAlu2+5fXCjelG4uGUFio+AiipF8HPCqgsxA9e5i+JEGk/aWkt6i3obZP5sQnaLMOigYA3ngEce3yp4=
#SAUCE_ACCESS_KEY=********-****-****-****-************(jatindhankhar/privly-applications)
- secure: BOfaPuGkeDJX+YhpoZn7zXzZLs+Kb6GALuap7jRX33M6igamx+MCMl1OTtKRuFiosZBDZQrs/E24QzRzSF9gBzqSqPTgQNUkoECwaIm0IIsdA8ff1SoFuFw8x8iFKFPXVb5C72xtwqXfqRAqchX6Jd4v/Wh+mEDMESxE5S5XIRY=
#SAUCE_URL=http://jatindhankhar:********-****-****-****-************@ondemand.saucelabs.com/wd/hub
- secure: sWkxx3v8RxChO0lZSYqNjkYvfg1Re6LwpDeBZIgw1qBBBg5UdCLJZitOAAqKsdoUpeVD0Hk9o6UdWfVnYAw81xArvHpl32VQgItY60UVhHVoszX5CQFo7bp0p59dPZbzx4XjJfZhM0btrHOUHpJkeoU6Ia9Z+gTiZ04uC+Jqi/s=
#CODECLIMATE_REPO_TOKEN=**************************(smcgregor/privly-applications)
- secure: CevDxddWV/R2vF66U94Id30vSkQ2I1DBY36bl2VPyY5OsBGhSFWaF0l5j6KIgBZyYrwQF2IT1I/hUPtLbTvHhPgaE5CcV1LHGxueWtaYEXfAfHSVy0ChhhilKdUOOyA7245yad6UHYQIwx7Kz/EKXXA/0hczEcUl/OH6ZxkGcws=
#CODECLIMATE_REPO_TOKEN=**************************(privly/privly-applications)
- secure: HAqHN7zeSbDR7BP0pn6qH6ODOwuMD7eIR9t4h1gHkRy6WAQBrhQb1+kTzkGbhfKB1mftxN/0ERTK6xv+iBj4QylqOOXChnuthuHMZiAuwPJncj8FYE4LHt2Eh48+HnzSQUgzjxv11hvkLz4utaj0J4fub2q/tWzoAXucA13UGQU=
script:
- cd test
- "if [ ${TRAVIS_PULL_REQUEST} = 'false' ]; then ./run_each.sh karma.conf-ci.js; fi"
- export BROWSERS_TO_TEST=Chrome,Firefox,Safari # test all the browsers
- "if [ ${TRAVIS_PULL_REQUEST} = 'false' ]; then ./run_each.sh karma.conf-ci.js; fi" # Run the unit tests
- "if [ ${TRAVIS_PULL_REQUEST} = 'false' ]; then ./node_modules/.bin/lcov-result-merger 'coverage/*.lcov' 'coverage/combined.lcov'; fi" # Merge the coverage results
- "cd .."
# Move the lcov.info file to the root
- "find . -name lcov.info -exec mv {} . \\;"
# Send the file to CodeClimate
- "if [ \"$CODECLIMATE_REPO_TOKEN\" ]; then codeclimate < lcov.info; fi"
- "if [ ${TRAVIS_PULL_REQUEST} = 'false' ]; then cat ./test/coverage/combined.lcov | ./test/node_modules/coveralls/bin/coveralls.js; fi" # Send the coverage results to coveralls
before_script:
- "cd test/ && npm install -g karma-cli && npm install && cd .."
- npm install -g codeclimate-test-reporter
addons:
sauce_connect: true
62 changes: 38 additions & 24 deletions Help/content_server.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,34 @@
This was likely rendered from the Privly-application templating system
See: https://github.com/privly/privly-applications/pull/19
-->
<title>
Help
</title>
<meta content="width=device-width, initial-scale=1.0" name="viewport"/>
<!-- Top Styles -->
<link class="top" href="../vendor/bootstrap/css/bootstrap.min.css" media="screen" rel="stylesheet"/>
<link class="top" href="../shared/css/top/top.css" rel="stylesheet"/>
<!-- Common Styles -->
<link href="../shared/css/common.css" media="screen" rel="stylesheet" type="text/css"/>
<link href="../shared/css/tooltip.css" media="screen" rel="stylesheet" type="text/css"/>
<script src="../vendor/polyfill/es6-promise.js">
</script>
<script src="../shared/javascripts/meta_loader.js" type="text/javascript">
</script>
<script src="../shared/javascripts/parameters.js" type="text/javascript">
</script>
<script src="../shared/javascripts/local_storage.js" type="text/javascript">
</script>
<script src="../shared/javascripts/context_messenger.js" type="text/javascript">
</script>
<script src="../shared/javascripts/glyph.js" type="text/javascript">
</script>
<script src="../shared/javascripts/storage.js" type="text/javascript">
</script>
<script src="../shared/javascripts/options.js" type="text/javascript">
</script>
<script src="../shared/javascripts/network_service.js" type="text/javascript">
</script>
<script src="../shared/javascripts/extension_integration.js" type="text/javascript">
<title>
Help
</title>
<link class="top" href="../vendor/bootstrap/css/bootstrap.min.css" media="screen" rel="stylesheet"/>
<link class="top" href="../shared/css/top/top.css" rel="stylesheet"/>
<script src="../shared/javascripts/event_emitter.js" type="text/javascript">
</script>
<script src="../shared/javascripts/local_storage.js" type="text/javascript">
<script src="../shared/javascripts/viewAdapters/new.js" type="text/javascript">
</script>
<script src="../vendor/jquery.min.js" type="text/javascript">
</script>
Expand Down Expand Up @@ -59,23 +68,23 @@
<ul class="nav navbar-nav">
<li class="logged_in_nav" style="display:none;">
<a href="../History/new.html">
History
<span class="glyphicon glyphicon-list-alt">
</span>
History
</a>
</li>
<li class="logged_out_nav">
<a class="login_url" href="../Login/new.html">
Login
<span class="glyphicon glyphicon-log-in">
</span>
Login
</a>
</li>
<li class="dropdown logged_in_nav" style="display:none;">
<a class="dropdown-toggle" data-toggle="dropdown" href="#">
New Link
<b class="caret">
</b>
New Link
</a>
<ul class="dropdown-menu">
<li class="dropdown-header">
Expand Down Expand Up @@ -143,9 +152,9 @@
</li>
<li class="logged_in_nav" style="display:none;">
<a class="logout_url" href="#" id="logout_link">
Logout
<span class="glyphicon glyphicon-log-out">
</span>
Logout
</a>
</li>
</ul>
Expand All @@ -156,32 +165,35 @@
<div class="container">
<div class="row">
<div class="col-lg-12">
<p class="flash notice" id="messages">
<p class="alert alert-info" id="messages">
Pending server check. The application is checking its connection
with the remote server.
</p>
<p class="flash notice" id="login_message" style="display:none;">
<p class="alert alert-warning" id="login_message" style="display:none;">
You are not currently signed into your content server. Please
<a class="login_url btn btn-default" href="../Login/new.html">
login
</a>
</p>
<div id="copy_message" style="display:none;">
<p class="flash notice">
Copy and paste the address found below to any website
you want to share this information through.
</p>
<p class="flash notice">
<p class="alert alert-warning">
<span id="step1_message">
<strong>
Step 1.
</strong>
Copy and paste the address found below to any website
you want to share this information through.
</span>
<span class="glyphicon glyphicon-link">
</span>
<span class="privlyUrl" data-privly-exclude="true">
</span>
</p>
<p class="flash notice open-app-button" style="display:none;">
<p class="alert alert-warning open-app-button" style="display:none;">
<strong>
Now copy/paste
Step 2.
</strong>
the highlighted address anywhere you want to share it. You can also
Copy/paste the highlighted address anywhere you want to share it. You can also
<a class="btn btn-default" href="" id="local_address" target="_blank">
open the link
</a>
Expand Down Expand Up @@ -239,6 +251,8 @@ <h2>
control. If you are not inclined to self-host, it is possible to host your content with other service providers. Remember that trusting others to host your data could be perilous to your privacy if you use an application that doesn't encrypt your data.
</li>
</ul>
<p>
</p>
<p>
Your content server may have information we can't display here. To view information presented by your content server you can visit your content server.
<br/>
Expand Down
38 changes: 16 additions & 22 deletions Help/js/help.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,7 @@ var callbacks = {
pendingLogin: function() {

// Save to local storage the app to redirect to after succesful log in
ls.setItem("Login:redirect_to_app", window.location.href);

// Set the nav bar to the proper domain
privlyNetworkService.initializeNavigation();
Privly.storage.set("Login:redirect_to_app", window.location.href);

var domain = privlyNetworkService.contentServerDomain();
$("#current_content_server").text(domain.split("/")[2]);
Expand All @@ -35,14 +32,6 @@ var callbacks = {
$(".chrome_options_link").show();
}

// Add listeners to show loading animation while making ajax requests
$(document).ajaxStart(function() {
$('#loadingDiv').show();
});
$(document).ajaxStop(function() {
$('#loadingDiv').hide();
});

privlyNetworkService.initPrivlyService(
privlyNetworkService.contentServerDomain(),
callbacks.pendingPost,
Expand Down Expand Up @@ -77,14 +66,19 @@ var callbacks = {

};

// Initialize the application
document.addEventListener('DOMContentLoaded',
function() {

// Don't start the script if it is running in a Headless
// browser
if( document.getElementById("logout_link") ) {
callbacks.pendingLogin();
}
document.addEventListener('DOMContentLoaded', function () {
// Don't start the script if it is running in a Headless
// browser
if (!document.getElementById("logout_link")) {
return;
}
);

var adapter = new Privly.app.viewAdapter.New({});

adapter.on('beforePendingLogin', function () {
callbacks.pendingLogin();
return true;
});

adapter.start();
});
66 changes: 39 additions & 27 deletions Help/new.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,34 @@
This was likely rendered from the Privly-application templating system
See: https://github.com/privly/privly-applications/pull/19
-->
<title>
Help
</title>
<meta content="width=device-width, initial-scale=1.0" name="viewport"/>
<!-- Top Styles -->
<link class="top" href="../vendor/bootstrap/css/bootstrap.min.css" media="screen" rel="stylesheet"/>
<link class="top" href="../shared/css/top/top.css" rel="stylesheet"/>
<!-- Common Styles -->
<link href="../shared/css/common.css" media="screen" rel="stylesheet" type="text/css"/>
<link href="../shared/css/tooltip.css" media="screen" rel="stylesheet" type="text/css"/>
<script src="../vendor/polyfill/es6-promise.js">
</script>
<script src="../shared/javascripts/meta_loader.js" type="text/javascript">
</script>
<script src="../shared/javascripts/parameters.js" type="text/javascript">
</script>
<script src="../shared/javascripts/local_storage.js" type="text/javascript">
</script>
<script src="../shared/javascripts/context_messenger.js" type="text/javascript">
</script>
<script src="../shared/javascripts/glyph.js" type="text/javascript">
</script>
<script src="../shared/javascripts/storage.js" type="text/javascript">
</script>
<script src="../shared/javascripts/options.js" type="text/javascript">
</script>
<script src="../shared/javascripts/network_service.js" type="text/javascript">
</script>
<script src="../shared/javascripts/extension_integration.js" type="text/javascript">
<title>
Help
</title>
<link class="top" href="../vendor/bootstrap/css/bootstrap.min.css" media="screen" rel="stylesheet"/>
<link class="top" href="../shared/css/top/top.css" rel="stylesheet"/>
<script src="../shared/javascripts/event_emitter.js" type="text/javascript">
</script>
<script src="../shared/javascripts/local_storage.js" type="text/javascript">
<script src="../shared/javascripts/viewAdapters/new.js" type="text/javascript">
</script>
<script src="../vendor/jquery.min.js" type="text/javascript">
</script>
Expand Down Expand Up @@ -59,23 +68,23 @@
<ul class="nav navbar-nav">
<li class="logged_in_nav" style="display:none;">
<a href="../History/new.html">
History
<span class="glyphicon glyphicon-list-alt">
</span>
History
</a>
</li>
<li class="logged_out_nav">
<a class="login_url" href="../Login/new.html">
Login
<span class="glyphicon glyphicon-log-in">
</span>
Login
</a>
</li>
<li class="active dropdown logged_in_nav" style="display:none;">
<a class="dropdown-toggle" data-toggle="dropdown" href="#">
New Link
<b class="caret">
</b>
New Link
</a>
<ul class="dropdown-menu">
<li class="dropdown-header">
Expand Down Expand Up @@ -143,9 +152,9 @@
</li>
<li class="logged_in_nav" style="display:none;">
<a class="logout_url" href="#" id="logout_link">
Logout
<span class="glyphicon glyphicon-log-out">
</span>
Logout
</a>
</li>
</ul>
Expand All @@ -156,32 +165,35 @@
<div class="container">
<div class="row">
<div class="col-lg-12">
<p class="flash notice" id="messages">
<p class="alert alert-info" id="messages">
Pending server check. The application is checking its connection
with the remote server.
</p>
<p class="flash notice" id="login_message" style="display:none;">
<p class="alert alert-warning" id="login_message" style="display:none;">
You are not currently signed into your content server. Please
<a class="login_url btn btn-default" href="../Login/new.html">
login
</a>
</p>
<div id="copy_message" style="display:none;">
<p class="flash notice">
Copy and paste the address found below to any website
you want to share this information through.
</p>
<p class="flash notice">
<p class="alert alert-warning">
<span id="step1_message">
<strong>
Step 1.
</strong>
Copy and paste the address found below to any website
you want to share this information through.
</span>
<span class="glyphicon glyphicon-link">
</span>
<span class="privlyUrl" data-privly-exclude="true">
</span>
</p>
<p class="flash notice open-app-button" style="display:none;">
<p class="alert alert-warning open-app-button" style="display:none;">
<strong>
Now copy/paste
Step 2.
</strong>
the highlighted address anywhere you want to share it. You can also
Copy/paste the highlighted address anywhere you want to share it. You can also
<a class="btn btn-default" href="" id="local_address" target="_blank">
open the link
</a>
Expand Down Expand Up @@ -256,10 +268,10 @@ <h1>
<strong>
<span class="glyphicon glyphicon-eye-open">
</span>
Experts Only:
Indie Hosts Only:
</strong>
Other applications built on Privly provide privacy only in special
circumstances and should be viewed as "experts only."
These applications provide privacy if you host your own content server.
If you don't know what that means, you should not use these apps.
</p>
<div class="col-md-3">
<form action="../PlainPost/new.html" style="display:inline;">
Expand Down
6 changes: 3 additions & 3 deletions Help/new.html.subtemplate
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,10 @@
<p>
<strong>
<span class="glyphicon glyphicon-eye-open"></span>
Experts Only:
Indie Hosts Only:
</strong>
Other applications built on Privly provide privacy only in special
circumstances and should be viewed as "experts only."
These applications provide privacy if you host your own content server.
If you don't know what that means, you should not use these apps.
</p>
<div class="col-md-3">
<form action="../PlainPost/new.html" style="display:inline;">
Expand Down
Loading

0 comments on commit 0ab5172

Please sign in to comment.