-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10 from amorim-cjs/Sprint-0
Main UI updates
- Loading branch information
Showing
7 changed files
with
282 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,4 +9,7 @@ | |
define('DB_USER', 'root'); | ||
define('DB_PWD', 'topsecret'); | ||
|
||
// error codes | ||
define('USER_NOT_LOGGED_IN', '10'); | ||
|
||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -69,6 +69,10 @@ | |
width:100%; | ||
text-align:center; | ||
} | ||
|
||
form { | ||
display: inline; | ||
} | ||
</style> | ||
|
||
<script> | ||
|
@@ -154,6 +158,23 @@ function leftCorner(){ | |
<script src="https://cdn.jsdelivr.net/npm/[email protected]"></script> | ||
<script src="<?=BASE_URL . 'assets/scripts/clamp.js'?>"></script> | ||
<script> | ||
function switchInterest(){ | ||
const xhr = new XMLHttpRequest(); | ||
xhr.onreadystatechange = function() { | ||
if (this.readyState == 4 && this.status == 200){ | ||
console.log(this.responseText); | ||
var response = JSON.parse(this.responseText); | ||
var bstr = '+ ' + response.count; | ||
document.getElementById('vote-btn').className = response.interest ? | ||
"w3-btn w3-theme-l5" : "w3-btn w3-theme"; | ||
document.getElementById('vote-btn').innerHTML = bstr; | ||
} | ||
}; | ||
xhr.open("GET", "/papers/switchVote?doi=" + "<?=urlencode($_GET['doi'])?>", true); | ||
xhr.send(); | ||
|
||
} | ||
|
||
function formatAuthors(){ | ||
var header = document.getElementById('paper-title'); | ||
const lines = screen.height < 450 ? 2 : 3; | ||
|
Oops, something went wrong.