Skip to content

Commit

Permalink
updated installation procedure
Browse files Browse the repository at this point in the history
  • Loading branch information
cubettech committed Feb 10, 2014
1 parent c2fff5d commit 557bbcb
Show file tree
Hide file tree
Showing 8 changed files with 801 additions and 128 deletions.
2 changes: 1 addition & 1 deletion application/config/mongodb.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ module.exports = {
//dbHost: '123.63.124.181',
dbHost: 'localhost',
dbPort: '',
dbName: 'myynafderfdef',
dbName: 'myynasdas',
dbUser: '',
dbPass: ''
}
33 changes: 17 additions & 16 deletions application/layouts/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,7 @@
<body>
{{{body}}}
<div class="loader">
<div class="demo-3 demo-dark">
<ul class="bokeh">
<li></li>
<li></li>
<li></li>
<li></li>
</ul>
</div>
<img src="/default/images/ajax-loader.gif"/>
</div>
</body>

Expand Down Expand Up @@ -101,7 +94,6 @@
var tempScrollTop;

$('#myModal').on('show.bs.modal', function (e) {
$('.loader').show();
tempScrollTop = $(window).scrollTop();
$('html').addClass('modal-open');
var url = window.localStorage.getItem('cbt_parenturl') ;
Expand Down Expand Up @@ -185,6 +177,7 @@

function modalInit(){
$('body').on('click', '*[data-toggle="modal"]',function(e){
$('.loader').show();
e.stopPropagation();
e.preventDefault();
var id = $(this).attr('data-target');
Expand All @@ -194,7 +187,12 @@
link += '/'+ $(this).attr('data-extend');
}

$(id).modal('show')
$(id).modal('show').on('hide.bs.modal',function(){
$(this).html('');
}).on('shown.bs.modal', function () {
setTimeout("$('.loader').hide();",100);
});

$(id).load(link);


Expand All @@ -208,7 +206,7 @@
window.localStorage.setItem('cbt_parenturl', url);
window.history.pushState({},"", str);
}
});
});
}

function popup_functions() {
Expand Down Expand Up @@ -328,9 +326,11 @@

$('#myModal').niceScroll();

imagesLoaded(document.querySelector('.boardMasonry'), function( instance ) {
$('.boardMasonry').masonry('reload');
});
if($('.boardMasonry').length > 0) {
imagesLoaded(document.querySelector('.boardMasonry'), function( instance ) {
$('.boardMasonry').masonry('reload');
});
}
if($('.domainContainer').length > 0) {
imagesLoaded(document.querySelector('.domainContainer'), function( instance ) {
$('.domainContainer').masonry('reload');
Expand All @@ -348,8 +348,9 @@
$('.overflw_sectn').niceScroll({
horizrailenabled: false
});
},500);
$('.loader').hide();
$('.loader').hide();
},800);

}

</script>
Expand Down
6 changes: 6 additions & 0 deletions application/layouts/login.html
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,12 @@
}
});

$('#signupform').keyup(function(e){
if(e.which == 13) {
$('#signupButton').click();
}
});

/* to clear pop up contents on each close */
$("#myModal,#Forgot").on('hidden.bs.modal', function () {
$("#signupform").get(0).reset();
Expand Down
74 changes: 33 additions & 41 deletions install/applications/views/install.html
Original file line number Diff line number Diff line change
Expand Up @@ -137,9 +137,9 @@ <h2>INSTALLATION</h2>

<!-- Tab panes -->
<div class="tab-content tab_ul">

<img src="/install-loader.GIF" id="install-loader" style="width:5.5%; text-align: center;"/>

<div id="install-loader" style="text-align: center;">
<img src="/install-loader.GIF" style="width:5.5%; text-align: center;"/>
</div>
<div class="tab-pane active" id="Agreement">
<h3>License Agreement</h3>
<div class="terms">
Expand Down Expand Up @@ -197,9 +197,7 @@ <h4>NO LIABILITY FOR DAMAGES.</h4>

<div class="tab-pane" id="Config">
<h3>Configuration</h3>
<div id="permission" style="color:red">
Please provide read and write permission to your config and db files and refresh.
</div>
<div id="permission" style="color:red"> </div>
<div class="row">
<div class="col-md-2 ">
<label class="input-label">Application Port</label>
Expand Down Expand Up @@ -368,7 +366,7 @@ <h3>Admin Settings</h3>
</div>
<div id="finish" class="final-msg">
<div class="restart-msg">Installed successfully</div>
<p class="restart-msg">Restart and feel the awesome.</p>
<p class="restart-msg">Restart your node application and feel the awesome.</p>

<div class="comm-data">
Please use this form to provide feedback ,
Expand Down Expand Up @@ -402,16 +400,9 @@ <h3>Admin Settings</h3>
</div>
</div>


</div>








</div>
</div>

Expand Down Expand Up @@ -477,9 +468,6 @@ <h3>Admin Settings</h3>
});
});

$('#permission').hide();


//form submit
$('#installform').ajaxForm(function(data) {
$('#final_state').show();
Expand All @@ -502,45 +490,49 @@ <h3>Admin Settings</h3>
$('#Agreement').hide();
$('#Settings').hide();
$('#Config').show();

}
else {
return false;
}
})


$('#second_step').click(function() {
if ($('#installform').valid()) {

$.ajax({
url: '/permissioncheck',
type: 'post',
dataType: 'json',
data: {
"port": $('#app_port').val(),
"dbhost": $('#db_host').val(),
"dbuser": $('#db_user').val(),
"dbpass": $('#db_password').val(),
"dbname": $('#db_name').val()
},
success: function(response) {

if (response.res == 0)
if (response.res == 3)
{

$('#permission').show();
$('#second_step').hide();
window.localStorage.removeItem('cubet_install_id');
var port = $('#app_port').val();
$('#Agreement').hide();
$('#Settings').show();
$('#Config').hide();
}
if (response.res == 1)
{
$('#permission').hide();
$('#second_step').show();
if (response.res == 0) {
$('#permission').html("Please provide read and write permission to config.js, defines.js, mongodb.js in your '/application/config' folder & '/uploads' folder.");
} else if (response.res == 2) {
$('#permission').html('Please check your database settings!');
}

},
error: function(jqxhr, status, error) {
// alert('e' + error);
}
});
}
else {
return false;
}
})


$('#second_step').click(function() {
if ($('#installform').valid())
{
window.localStorage.removeItem('cubet_install_id');
var port = $('#app_port').val();
$('#Agreement').hide();
$('#Settings').show();
$('#Config').hide();


}
else {
Expand Down
655 changes: 654 additions & 1 deletion public/default/js/bootstrap.min.js

Large diffs are not rendered by default.

22 changes: 10 additions & 12 deletions public/default/js/pincreation.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,4 @@
$(document).ready(function() {
// var tpe = window.location.pathname;
// arr = tpe.split('/');
// alert(arr[0]);
// alert(arr[1]);
// alert(arr[2]);
/* to clear pop up contents */
$('body').on('hidden.bs.modal', '.modal', function () {
//$(this).html('');
});

//$('.social_image').hide();
$('.sharegr').hover(function() {
Expand Down Expand Up @@ -534,6 +525,7 @@ function boardUnfollow(board_id, user_id)

function pinlike(pin_id, elem, pop)
{
$(elem).addClass("disable-like");
if(pop){
var clickFunction = "pinUnlike('" + pin_id + "', this, 'pop')";
} else {
Expand Down Expand Up @@ -568,12 +560,16 @@ function pinlike(pin_id, elem, pop)
},
error: function(jqxhr, status, error) {
//alert('e' + error);
},
complete: function(jqxhr, status, error) {
$(elem).removeClass("disable-like");
}
});
}

function pinUnlike(pin_id, elem, pop) {

$(elem).addClass("disable-like");
if(pop){
var clickFunction = "pinlike('" + pin_id + "', this, 'pop')";
} else {
Expand All @@ -590,9 +586,8 @@ function pinUnlike(pin_id, elem, pop) {
dataType: 'json',
success: function(data) {
$(elem).attr("onClick", clickFunction);
$(elem).removeClass("active");

//$(elem).addClass("disable-like");
$(elem).removeClass("active");

if(pop){
var count_elem = $(elem).children('span');
} else {
Expand All @@ -604,6 +599,9 @@ function pinUnlike(pin_id, elem, pop) {
},
error: function(jqxhr, status, error) {
// alert('e' + error);
},
complete: function(jqxhr, status, error) {
$(elem).removeClass("disable-like");
}
});

Expand Down
31 changes: 17 additions & 14 deletions public/default/js/socket_p1.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,22 +20,25 @@ jQuery(function() {
msg.pin_type == 'video') && (tpe == 'pins' || (tpe == 'user' && id==msg.data.user_id) || (tpe == 'category' && id==msg.data.category_id) || (tpe == 'board' && id==msg.data.board_id)))
{

$('#container')
.prepend(msg.str)
.masonry('reload');
$('#pop_up_container')
.prepend(msg.str)
.masonry('reload');
$('audio').mediaelementplayer();
if($('#container').find('#myCarousel2_'+msg.data._id).length <= 0){

setTimeout(function() {
$('#container').masonry('reload');
}, 500);
$('#container')
.prepend(msg.str)
.masonry('reload');
$('#pop_up_container')
.prepend(msg.str)
.masonry('reload');
$('audio').mediaelementplayer();

setTimeout(function() {
$('#container').masonry('reload');
}, 1000);

setTimeout(function() {
$('#container').masonry('reload');
}, 500);

setTimeout(function() {
$('#container').masonry('reload');
}, 1000);

}
}
});
}
Expand Down
Loading

0 comments on commit 557bbcb

Please sign in to comment.