mirror of
https://github.com/gamaio/unps.us-Shortener.git
synced 2024-12-22 10:12:41 +00:00
Include Vex files
This has a slightly better look than the dropdown menu
This commit is contained in:
parent
b7f4803540
commit
382242298d
39
assets/js/vex.js
Normal file
39
assets/js/vex.js
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
vex.defaultOptions.className = 'vex-theme-os';
|
||||||
|
|
||||||
|
// Login button from navbar
|
||||||
|
$('.login').click(function(){
|
||||||
|
vex.dialog.open({
|
||||||
|
showCloseButton: true,
|
||||||
|
message: 'Enter your username and password:',
|
||||||
|
input: '' +
|
||||||
|
'<input name="username" type="text" placeholder="Username" required />' +
|
||||||
|
'<input name="password" type="password" placeholder="Password" required />' +
|
||||||
|
'<input name="register" type="submit" class="btn loginbtn" value="Register" onclick="userReg()" />' +
|
||||||
|
'',
|
||||||
|
buttons: [
|
||||||
|
$.extend({}, vex.dialog.buttons.YES, { text: 'Login' }),
|
||||||
|
$.extend({}, vex.dialog.buttons.NO, { text: 'Cancel' })
|
||||||
|
],
|
||||||
|
callback: function (data) {
|
||||||
|
if (data.username == undefined){
|
||||||
|
}else if (data.password == undefined){
|
||||||
|
}else if (data.register == true){
|
||||||
|
// ?
|
||||||
|
}else{
|
||||||
|
// AJAX request to log in
|
||||||
|
$.post("../../login.php", data, function(datam){
|
||||||
|
$("#message").hide().html(datam).fadeIn("fast");
|
||||||
|
if($('#error').length){
|
||||||
|
$('#short-button').removeClass('btn-primary');
|
||||||
|
$('#short-button').removeClass('btn-success');
|
||||||
|
$('#short-button').addClass('btn-danger');
|
||||||
|
}else if($('#success').length){
|
||||||
|
$('#short-button').removeClass('btn-primary');
|
||||||
|
$('#short-button').removeClass('btn-danger');
|
||||||
|
$('#short-button').addClass('btn-success');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
13
index.php
13
index.php
@ -50,6 +50,11 @@
|
|||||||
|
|
||||||
<link href="assets/bootstrap/css/bootstrap.css" rel="stylesheet" media="screen" />
|
<link href="assets/bootstrap/css/bootstrap.css" rel="stylesheet" media="screen" />
|
||||||
<link href="assets/css/elements.css?<?php echo time(); ?>" rel="stylesheet" />
|
<link href="assets/css/elements.css?<?php echo time(); ?>" rel="stylesheet" />
|
||||||
|
|
||||||
|
<!-- Vex CSS (http://github.hubspot.com/vex/) -->
|
||||||
|
<link href="../CDN/vex-1.3.5/css/vex.css" rel="stylesheet" />
|
||||||
|
<link href="../CDN/vex-1.3.5/css/vex-theme-os.css" rel="stylesheet" />
|
||||||
|
|
||||||
<link rel="shortcut icon" type="image/ico" href="favicon.ico"/>
|
<link rel="shortcut icon" type="image/ico" href="favicon.ico"/>
|
||||||
<link rel="shortcut icon" type="image/x-icon" href="favicon.ico"/>
|
<link rel="shortcut icon" type="image/x-icon" href="favicon.ico"/>
|
||||||
|
|
||||||
@ -82,8 +87,7 @@
|
|||||||
<label class="btn btn-primary" id="replab" style="color:#eee;"><input type="radio" id="replink" name="linkmod" value="replink">Report Link</label>
|
<label class="btn btn-primary" id="replab" style="color:#eee;"><input type="radio" id="replink" name="linkmod" value="replink">Report Link</label>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
<div id="message">
|
<div id="message"></div>
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -101,6 +105,11 @@
|
|||||||
<script type="text/javascript" language="JavaScript" src="assets/bootstrap/js/bootstrap.js"></script>
|
<script type="text/javascript" language="JavaScript" src="assets/bootstrap/js/bootstrap.js"></script>
|
||||||
<script type="text/javascript" language="JavaScript" src="assets/js/autoresize.jquery.js"></script> <!-- Credit to http://james.padolsey.com for this jQuery plugin -->
|
<script type="text/javascript" language="JavaScript" src="assets/js/autoresize.jquery.js"></script> <!-- Credit to http://james.padolsey.com for this jQuery plugin -->
|
||||||
<script type="text/javascript" language="JavaScript" src="assets/js/unps.core.js"></script>
|
<script type="text/javascript" language="JavaScript" src="assets/js/unps.core.js"></script>
|
||||||
|
|
||||||
|
<!-- Vex stuff -->
|
||||||
|
<script src="../CDN/vex-1.3.5/js/vex.combined.min.js"></script>
|
||||||
|
<script src="assets/js/vex.js"></script>
|
||||||
|
|
||||||
<script type="text/javascript" language="JavaScript">
|
<script type="text/javascript" language="JavaScript">
|
||||||
// This is our AJAX - Thank you Wizzy <3
|
// This is our AJAX - Thank you Wizzy <3
|
||||||
$("#form-shorten").submit(function(event){
|
$("#form-shorten").submit(function(event){
|
||||||
|
Loading…
Reference in New Issue
Block a user