@@ -4,18 +4,19 @@
ViewBag.Title = "Home Page";
}

<link href="http://style.aliunicorn.com/css/6v/??run/wholesale/reset.css,run/wholesale/font.css,apollo/core/core-ws.css?t=133438bc8_3337ca690" rel="stylesheet" type="text/css" media="all" />


<div class="col-lg-12" id="aComDiv" style="position:relative;"><b><span style="color:red">50%</span> discount on Elctronic Devisece <span style="color:red">30%</span> discount on women lundery <span style="color:red">25%</span> on hair Productions <span style="color:red">15%</span> discount on books </b><b><span style="color:red">Free</span> shipping </b> </div>


<div class="row" id="seen">
<div class="col-lg-3" id="Nav">
<div id="seen" style="max-width:1490px">
<div class="col-lg-1" id="Nav">
@Html.Partial("NavigationBar")
</div>

<div class="col-lg-9" id="Curent">
@*@Html.Partial("Top3products", MvcProject.Controllers.HomeController.client.GetProducts())*@

<div class="col-lg-11" id="Curent">
@*@Html.Partial("Top3products")*@
</div>
</div>

@@ -25,59 +26,64 @@

<script>
//document.getElementById("seen").style = innerWidth; //$("Curent").empty()
//Product(ushort quantity)
//Department(string departmentName)
function Remove() {
var id = id;
var xMLHttpRequest = new XMLHttpRequest();
xMLHttpRequest.open("GET", "/Home/Top3products", true);
xMLHttpRequest.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
xMLHttpRequest.send();
xMLHttpRequest.onreadystatechange = function () {
if (xMLHttpRequest.readyState == 4 && xMLHttpRequest.status != 200) {
alert("Failed to load");
}
else {
document.getElementById("Curent").innerHTML = xMLHttpRequest.responseText;
}
}
function loadPage() {
$.get('/Home/Top3products', function (res) {
console.debug('load page');
//$('#Curent').html(res);
$('#Curent')[0].innerHTML = res;
});
}
//function nav() {
//function Remove() {
// var id = id;
// var xMLHttpRequest = new XMLHttpRequest();
// xMLHttpRequest.open("GET", "/Home/NavigationBar", true);
// xMLHttpRequest.open("GET", "/Home/Top3products", true);
// xMLHttpRequest.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
// xMLHttpRequest.send();
// xMLHttpRequest.onreadystatechange = function () {
// if (xMLHttpRequest.readyState == 4 && xMLHttpRequest.status != 200) {
// alert("failed to load")
// document.getElementById("Nav").innerHTML = xMLHttpRequest.responseText;
// alert("Failed to load");
// }
// else {
// document.getElementById("Nav").innerHTML = xMLHttpRequest.responseText;
// document.getElementById("Curent").innerHTML = xMLHttpRequest.responseText;
// }
// }
//}
//Remove();
//nav();
var e = document.getElementById("aComDiv");
var s = 1;
setInterval(function () {
var eLeftPos = e.offsetLeft;
e.style.left = (eLeftPos + s) + 'px';
if (parseInt(e.style.left) >1000) { e.style.left = '0px'; }
}, 1000);
//function nav() {
// var id = id;
// var xMLHttpRequest = new XMLHttpRequest();
// xMLHttpRequest.open("GET", "/Home/NavigationBar", true);
// xMLHttpRequest.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
// xMLHttpRequest.send();
// xMLHttpRequest.onreadystatechange = function () {
// if (xMLHttpRequest.readyState == 4 && xMLHttpRequest.status != 200) {
// alert("failed to load")
// document.getElementById("Nav").innerHTML = xMLHttpRequest.responseText;
// }
// else {
// document.getElementById("Nav").innerHTML = xMLHttpRequest.responseText;
// }
// }
//}
loadPage();
//nav();
var e = document.getElementById("aComDiv");
var s = 1;
setInterval(function () {
var eLeftPos = e.offsetLeft;
e.style.left = (eLeftPos + s) + 'px';
if (parseInt(e.style.left) > 1000) { e.style.left = '0px'; }
}, 1000);
</script>


@@ -3,6 +3,14 @@
ViewBag.Title = "NavigationBar";
}
<style>
.sticky {
position: fixed;
width: 100%;
left: 0;
top: 0;
z-index: 100;
border-top: 0;
}
.menu, .menu ul, .menu ul li, .menu ul li a {
margin: 0px auto;
padding: 0;
@@ -234,7 +242,7 @@
})(jQuery);
</script>
@*<script>
<script>
function categorypage(id) {
alert("hi");
var id = id;
@@ -255,9 +263,8 @@
}
}
</script>*@
<div class=" navbar navbar-left" role="navigation" style="display:table; padding:10px; width: 100%; min-height: 500px">
<div id="right" style="width: 80%; margin-left: auto;float:right;padding-left:2em">
</script>


@{int i = 0;
Dictionary<string, string> c = new Dictionary<String, String>();
@@ -277,7 +284,7 @@
}


@*@Html.Partial("Index");*@




@@ -324,20 +331,20 @@
{
@:
<li class='active sub'>
<a href='#'>@cate.Name</a><ul>
<a href='/Home/Category/@cate.Name'>@cate.Name</a><ul>
@foreach (var s in MvcProject.Controllers.HomeController.client.SubCategories())
{
if (s.ParentCategory.Name == cate.Name)
{
@:<li class='sub' id="@s.Name">
@: <a href='#'>@s.Name</a>
@: <a href='/Home/Category/@s.Name'>@s.Name</a>
@:<ul >
foreach (var ss in MvcProject.Controllers.HomeController.client.SubCategories())
{
if (ss.ParentCategory.Name == s.Name)
{

<li class="last"><a href="#">@ss.Name</a></li>
<li class="last"><a href="/home/SubCategory?subcategory=@ss.Name">@ss.Name</a></li>
}

}
@@ -356,44 +363,65 @@

</ul>
</div>
</div>
@*</div>*@
@section scripts{
@*<script>
alert("s");
function categorypage(id)
{
alert("hi");
var id = id;
alert("hi");
var xMLHttpRequest = new XMLHttpRequest();
xMLHttpRequest.open("GET", "/Home/Category/"+id, true);
xMLHttpRequest.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
xMLHttpRequest.send();
xMLHttpRequest.onreadystatechange = function () {
if (xMLHttpRequest.readyState == 4 && xMLHttpRequest.status != 200) {
alert("failed to load")
document.getElementById("Curent").innerHTML = xMLHttpRequest.responseText;
}
else {
<script>
alert("s");
function categorypage(id)
{
alert("hi");
var id = id;
alert("hi");
var xMLHttpRequest = new XMLHttpRequest();
xMLHttpRequest.open("GET", "/Home/Category/"+id, true);
xMLHttpRequest.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
xMLHttpRequest.send();
xMLHttpRequest.onreadystatechange = function () {
if (xMLHttpRequest.readyState == 4 && xMLHttpRequest.status != 200) {
alert("failed to load")
document.getElementById("Curent").innerHTML = xMLHttpRequest.responseText;
}
else {

document.getElementById("Curent").innerHTML = xMLHttpRequest.responseText;
document.getElementById("Curent").innerHTML = xMLHttpRequest.responseText;
}
}
}

}
$(function () {
$('#category').on('change', function () {
}
$(function () {
$('#category').on('change', function () {

var c = $('#category').val();
$('#subcategory option').hide();
$('#subcategory option[value="' + c + '"]').show();
$("#subcategory").val($('#subcategory option[value="' + c + '"]:first').val());
var c = $('#category').val();
$('#subcategory option').hide();
$('#subcategory option[value="' + c + '"]').show();
$("#subcategory").val($('#subcategory option[value="' + c + '"]:first').val());

});
$("ul").dataTable()
});
$("ul").dataTable()

$(document).ready(function() {
var stickyNavTop = $('.navbar-left').offset().top;

var stickyNav = function(){
var scrollTop = $(window).scrollTop();

if (scrollTop > stickyNavTop) {
$('.nav').addClass('sticky');
} else {
$('.nav').removeClass('sticky');
}
};

stickyNav();

$(window).scroll(function() {
stickyNav();
});
});



</script>*@
}
</div>
</script>

}
@@ -1,123 +1,147 @@
@model IDictionary<MvcProject.BuyNet.Product, MvcProject.BuyNet.Category>
@using MvcProject.Controllers;
@using MvcProject.BuyNet;
@using MvcProject.BuyNet;


<div class="container">
<div class="jumbotron">
<h1> Our Top Product </h1>

</div>

<div class="col-lg-11">
<div class="row">
<div class="col-lg-9">
@{int div = 0;
@:<div class="row">
foreach (var item in Model.ToList())
{
@:<a herf=>@item.Value.Name <span class="glyphicon glyphicon-play"></span></a>
@:<div class="row">
@:<div class="col-md-4">
@:<div hidden>@div++;</div>
@:<h2>@item.Key.Name</h2>
@:<p>
@: <div>
@:<a href="/home/Product_Page/@item.Key.Id">
if (div == 0)
{
@:<a herf=> <span class="glyphicon glyphicon-play">@item.Value.Name</span></a><br />
}

@:<div class="col-md-4">
@:<div hidden>@{div++; }</div>
@:<h3>@item.Key.Name</h3>
@:<p>
@: <div>
@:<a href="/home/Product_Page/@item.Key.Id">
string img = item.Key.Images.FirstOrDefault() == null ? "/pics/empty2.png" : item.Key.Images[0].img;
@: <img src="@Html.Raw(img)" alt="@item.Key.Name" width="150" height="150" />
@:</a>
@:</div>
@:<br />
@:<div>
@:Rate:
@: <img src="@Html.Raw(img)" alt="@item.Key.Name" width="150" height="150" />
@:
@:
@:</a>
@:
@:
@: </div>
@:<br />
@:<div>
@:Rate:

for (int i = 0; i < @item.Key.Rate; i++)
{
@:<span class="bottom glyphicon glyphicon glyphicon-star"></span>
@:<span class="bottom glyphicon glyphicon glyphicon-star"></span>
}
if (@item.Key.Rate < 5)
{
for (int i = 0; i < (5 - @item.Key.Rate); i++)
{
@:<span class="bottom glyphicon glyphicon glyphicon-star-empty"></span>
@:<span class="bottom glyphicon glyphicon glyphicon-star-empty"></span>
}
}

@: </div>
@:<div>
@item.Key.Description

@:</div>
@:<div>price:US @item.Key.Price <span class="glyphicon glyphicon-usd"></span></div>

@:</p>
@:<p>
@: <a class="btn btn-primary" href="/home/BuyMe/@item.Key.Id">Buy Me Now &raquo;</a>

@:</p>
@: </div>
if (div == 3)

@:
@:
@:</div>
@:<div>
@item.Key.Description

@:
@:
@: </div>
@:<div>price:US @item.Key.Price <span class="glyphicon glyphicon-usd"></span></div>


@:
@:
@:</p>
@:<p>
@: <a class="btn btn-primary" href="/home/BuyMe/@item.Key.Id">Buy Me Now &raquo;</a>
@:
@:
@: </p>
@:
@:
@: </div>
if (div == 3)
{
<script>
document.write("</div>");
</script>
@:<br />
div = 0;
@:<div class="row">
}

}


}


</div>




<div class="col-lg-1">
<table>
<thead>
<b>see what your <span style="color:cornflowerblue">FB</span> friend`s bought</b>

</thead>

<tr>
<td>
<a style="color:cornflowerblue"><b>Ilanit Farda</b></a><br /> has a <a style="color:red">Galaxy 6</a>


</td>
</tr>
<tr>
<td><a class="glyphicon glyphicon-thumbs-up"></a> <a style="padding-left:30px" class="glyphicon glyphicon-thumbs-down"></a></td>

}

</tr>
<tr>
<td><a style="color:cornflowerblue"><b>Daniel Gola</b></a><br /> bought a <a style="color:red">SoneyPlastion</a></td>
</tr>
<tr>
<td><a class="glyphicon glyphicon-thumbs-up"></a> <a style="padding-left:30px" class="glyphicon glyphicon-thumbs-down"></a></td>


</tr>
<tr>
<td><a style="color:cornflowerblue"><b>Natan Biest</b></a><br /> bought a <a style="color:red">Ring</a></td>
</tr>
<tr>
<td><a class="glyphicon glyphicon-thumbs-up"></a> <a style="padding-left:30px" class="glyphicon glyphicon-thumbs-down"></a></td>

}
</div>
</div>
}
</div>
<div class="col-lg-2">
<table>
<thead>
<b>see what your <span style="color:cornflowerblue">FB</span> friend`s bought</b>

</thead>

<tr>
<td>
<a style="color:cornflowerblue"><b>Ilanit Farda</b></a><br /> has a <a style="color:red">Galaxy 6</a>


</td>
</tr>
<tr>
<td><a class="glyphicon glyphicon-thumbs-up"></a> <a style="padding-left:30px" class="glyphicon glyphicon-thumbs-down"></a></td>


</tr>
<tr>
<td><a style="color:cornflowerblue"><b>Daniel Gola</b></a><br /> bought a <a style="color:red">SoneyPlastion</a></td>
</tr>
<tr>
<td><a class="glyphicon glyphicon-thumbs-up"></a> <a style="padding-left:30px" class="glyphicon glyphicon-thumbs-down"></a></td>


</tr>
<tr>
<td><a style="color:cornflowerblue"><b>Natan Biest</b></a><br /> bought a <a style="color:red">Ring</a></td>
</tr>
<tr>
<td><a class="glyphicon glyphicon-thumbs-up"></a> <a style="padding-left:30px" class="glyphicon glyphicon-thumbs-down"></a></td>


</tr>
<tr>
<td><a style="color:cornflowerblue"><b>Asher Ababa</b></a><br /> bought a <a style="color:red">Blaston</a></td>
</tr>
<tr>
<td><a class="glyphicon glyphicon-thumbs-up"></a> <a style="padding-left:30px" class="glyphicon glyphicon-thumbs-down"></a></td>
</tr>
<tr>
<td><a style="color:cornflowerblue"><b>Ronit Micheali</b></a><br /> has a new <a style="color:red">TV</a></td>
</tr>
<tr>
<td><a class="glyphicon glyphicon-thumbs-up"></a> <a style="padding-left:30px" class="glyphicon glyphicon-thumbs-down"></a></td>
</tr>
</table>
</div>

</tr>
<tr>
<td><a style="color:cornflowerblue"><b>Asher Ababa</b></a><br /> bought a <a style="color:red">Blaston</a></td>
</tr>
<tr>
<td><a class="glyphicon glyphicon-thumbs-up"></a> <a style="padding-left:30px" class="glyphicon glyphicon-thumbs-down"></a></td>
</tr>
<tr>
<td><a style="color:cornflowerblue"><b>Ronit Micheali</b></a><br /> has a new <a style="color:red">TV</a></td>
</tr>
<tr>
<td><a class="glyphicon glyphicon-thumbs-up"></a> <a style="padding-left:30px" class="glyphicon glyphicon-thumbs-down"></a></td>
</tr>
</table>
</div>
<br />
</div>


@@ -126,64 +150,35 @@








<br />
<div class="fb-like" data-href="@*https://developers.facebook.com/docs/plugins/*@" data-layout="standard" data-action="like" data-show-faces="true" data-share="true"></div>
<div class="fb-like"
data-share="true"
data-width="450"
data-show-faces="true">
</div>



<div id="fb-root"></div>

<script>
(function (d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/he_IL/sdk.js#xfbml=1&version=v2.4&appId=1626739400941856";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
<div id="fb-root"></div>
<script>
(function (d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/he_IL/sdk.js#xfbml=1&version=v2.4&appId=1626739400941856";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
<div class="fb-like" data-href="@*https://developers.facebook.com/docs/plugins/*@" data-layout="standard" data-action="like" data-show-faces="true" data-share="true"></div>
<div
class="fb-like"
data-share="true"
data-width="450"
data-show-faces="true">
</div>
<div class="fb-share-button" data-href="@*https://developers.facebook.com/docs/plugins/*@" data-layout="button_count"></div>
<div class="fb-comments" data-href="@*http://developers.facebook.com/docs/plugins/comments/*@" data-numposts="5"></div>
<script>
//var e = document.getElementById("aComDiv");
//var s = 1;
//setInterval(function () {
// var eLeftPos = e.offsetLeft;
// e.style.left = (eLeftPos + s) + 'px';
// if (parseInt(e.style.left) > 1000) { e.style.left = '0px'; }
//}, 1000);
//var top = document.getElementById("aDiv").style.top;
//setInterval(function () {
// top += 1;
// var e = document.getElementById("aDiv");
// // Increase the top position by 1 pixel
// e.style.top = top + 'px';
// // If the top position is greater than 100px, set it to 100px
// if (parseInt(e.style.top) > 100) { e.style.top = '100px'; }
//}, 1000);
</script>
<div class="fb-share-button" data-href="@*https://developers.facebook.com/docs/plugins/*@" data-layout="button_count"></div>
<div class="fb-comments" data-href="@*http://developers.facebook.com/docs/plugins/comments/*@" data-numposts="5"></div>
<script>
//var e = document.getElementById("aComDiv");
//var s = 1;

//setInterval(function () {

// var eLeftPos = e.offsetLeft;
// e.style.left = (eLeftPos + s) + 'px';
// if (parseInt(e.style.left) > 1000) { e.style.left = '0px'; }

//}, 1000);
//var top = document.getElementById("aDiv").style.top;
//setInterval(function () {
// top += 1;
// var e = document.getElementById("aDiv");

// // Increase the top position by 1 pixel
// e.style.top = top + 'px';
// // If the top position is greater than 100px, set it to 100px
// if (parseInt(e.style.top) > 100) { e.style.top = '100px'; }
//}, 1000);

</script>
@@ -0,0 +1,56 @@
@{
ViewBag.Title = "Details";
}

<h2>Details</h2>

@{Order or = (Order)Session["order"];


decimal sum = 0;
<table border="1" cellpadding="10">
@if (or == null)
{
<tr>
<td> Order was not found</td>
</tr>
}
else
{

<thead style="color:blue;font-weight:bold">
<tr>
<td> Product Name</td>
<td> Product Price</td>
<td> Quntity</td>
<td> Price At Payment</td>



</tr>
</thead>
foreach (var orderProduct in Model1.orderProduct)
{
if (orderProduct.Value.Order.Id == or.Id && orderProduct.Value.Order.TimeOfPayment != null)
{
<tr>
<td>@orderProduct.Value.Product.Name </td>
<td>@orderProduct.Value.Product.Price </td>
<td>@orderProduct.Value.Quantity</td>
<td>@orderProduct.Value.A_PriceAtPayment()</td><
<td hidden>@{sum += orderProduct.Value.PriceAtPayment;} </td>


</tr>
}
}





}
</table>
<hr />
<h4>SUM=@sum</h4>
}
@@ -0,0 +1,7 @@

@{
ViewBag.Title = "Index";
}

<h2>Index</h2>

@@ -0,0 +1,95 @@

@{
ViewBag.Title = "Payment";
}
<style>
.left {
margin-top: 80PX;
}
.right {
margin-left: 60%;
margin-top: 80PX;
}
</style>

<h2>Payment</h2>
<hr />
<h4>Enter a payment Details and comfirm payment</h4>
<br />

@{OrderProduct or = (OrderProduct)Session["orderProduct"]; if (or == null) { <span>Order did not found</span>}
else
{
<table>
<tr>
<td><b>User Name:</b>@or.Order.user.UserName</td>
</tr>
<tr>
<td><b>User Id:</b>@or.Order.user.Id</td>
</tr>

</table>

<br />
<br />
<form name="myForm" method="post">
Please select the wanted payment:
<select name="card" onselect="seclected">
<option>AmericanExspress</option>
<option>MasterCard</option>
<option>Visa</option>
<option>PayPall</option>
</select>
<br />
<br />
Please Enter your card number:
<input maxlength="10" name="cardNumber" id="card" onkeypress="return numbersonly(event)" />
<br />
<br />
Please enter cvc number (3-digit code Card Security number behind the card):
<input maxlength="3" name="cvc" onkeypress="return numbersonly (event)" />
<br />
<br />
Please enter full name of the card owner:
<input name="firstName" placeholder="First Name" />
<input name="lastName" placeholder="Last Name" />
<br />
<br />
Please enter card owner Id:
<input name="Id" maxlength="9" onkeypress="return numbersonly (event)" />
<br />
<br />
Please enter your delivery adress:
<input name="street" placeholder="street" />
<input name="city" placeholder="city" />
<input name="post_code" placeholder="post code" onkeypress="return numbersonly (event)" />
<br />
<br />
<input type="submit" value="Pay now" class="btn btn-primary">
<br />
<br />
</form>

<span class="alert-@ViewBag.Success">

@ViewBag.Message
</span>


<footer>
<a href="/Home/Index" class="btn btn-primary left">Home page</a>
<a href="~/Order/ShoopingHistory" class="btn btn-primary right">View shooping history</a>
</footer>
}
<script>
function numbersonly(e) {
var unicode = e.charCode ? e.charCode : e.keyCode
if (unicode != 8) { //if the key isn't the backspace key (which I should allow)
if (unicode < 48 || unicode > 57) //if not a number
return false //disable key press
}
}
</script>

}
@@ -0,0 +1,72 @@
@{
ViewBag.Title = "ShoopingHistory";
}

<h2>Shooping History</h2>
<hr />
<br />

@{User user = (User)Session["user"];
decimal sum=(decimal)Session["sum"];
if (user == null || Model1.order == null ||sum==null)
{
<span class="alert-warning">order was not found</span>
}
else
{
<span style="font-weight:bold">
User Name:@user.UserName
<br />
User Id:@user.Id
<br />
<br />
<br />
</span>
<table border="1" cellpadding="10">
<thead style="color:blue;font-weight:bold">
<tr>
<td>Order Id Number</td>
<td>Time Of Order Payment</td>
<td>Total Price</td>
<td>press for more</td>
</tr>
</thead>
@foreach (var order in Model1.order)
{
if (order.Value.user.Id == user.Id && order.Value.TimeOfPayment != null)
{
<tr>
<td>
@order.Key
</td>
<td>
@order.Value.TimeOfPayment
</td>
<td>
@{sum = 0;
foreach (var oProduct in Model1.orderProduct)
{
if (oProduct.Value.Order.Id == order.Key)
{
sum += oProduct.Value.PriceAtPayment;
}

}

}
sum= @sum $
</td>
<td>
<a href="~/Order/Details?Id=@order.Key">Details</a>
</td>
</tr>
}
}


</table>

}

}

@@ -1,5 +1,5 @@


@model MvcProject.BuyNet.User
<!DOCTYPE html>
<html>
<head>
@@ -16,9 +16,9 @@



<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
@Html.Partial("Login")



</head>
<body>
@@ -48,9 +48,9 @@
</span>

<input id="searchbox" style="position: fixed;" type="text" class="form-control" placeholder="Search for...">
<div style="position:absolute">
<div style="position:absolute">
<ul class=" nav-list bs-docs-sidenav" style="padding-top:34px; position:fixed" id="options">
@*here we bring the result by Search*@
@*here we bring the result by Search*@
</ul>

</div>
@@ -60,14 +60,14 @@
</ul>

</div>



@Html.Partial("_LoginPartial")
</div>
</div>

<div class="container body-content">
<div class="container-fluid">



@@ -76,64 +76,168 @@

@RenderSection("scripts", required: false)


@*<script>
$(function () {
$("#dialog-modal").dialog({
autoOpen: false,
width: 580,
height: 400,
show: {
effect: "blind",
duration: 1000
},
hide: {
effect: "explode",
duration: 1000
}
});
$("#modal-opener").click(function () {
$("#dialog-modal").dialog("open");
});

<script>
$(function () {
$("#dialog-modal").dialog({
autoOpen: false,
width: 580,
height: 400,
show: {
effect: "blind",
duration: 1000
},
hide: {
effect: "explode",
duration: 1000
}
});
$("#loginLink").click(function (e) {
e.preventDefault();
$("#dialog-modal").dialog("open");
});
});
function onSuccess() {
$("#dialog-modal").dialog("close");
function onSuccess() {
$("#dialog-modal").dialog("close");
}
</script>
<script>
$(document).click(function () {
$.each($('#options'), function (i, item) {
$('.opt').remove();
}
</script>*@
<script>
)
});
$('#searchbox').keyup(function () {
$(document).click(function () {
$.each($('#options'), function (i, item) {
$('.opt').remove();
$.each($('#options'), function (i, item) {
$('.opt').remove();
})
var t = document.getElementById('searchbox').value;
$.getJSON("/Home/SearchActionMethod", { word: t },
function (data) {
var ul = $('#options');
$.each(data, function (i, item) {
ul.addClass("nav nav-list bs-docs-sidenav ");
ul.append("<li class='opt dropdown-toggle' data-toggle='dropdown' style='background-color:white;width:280px;position:relative'><a href='#'>" + item + "</a></li>");
});
}
)
);
})
</script>
<script>
(function (d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/he_IL/sdk.js#xfbml=1&version=v2.4&appId=1626739400941856";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
<div id="fb-root"></div>


<script>
// This is called with the results from from FB.getLoginStatus().
function statusChangeCallback(response) {
console.log('statusChangeCallback');
console.log(response);
// The response object is returned with a status field that lets the
// app know the current login status of the person.
// Full docs on the response object can be found in the documentation
// for FB.getLoginStatus().
if (response.status === 'connected') {
// Logged into your app and Facebook.
testAPI();
} else if (response.status === 'not_authorized') {
// The person is logged into Facebook, but not your app.
document.getElementById('status').innerHTML = 'Please log ' +
'into this app.';
} else {
// The person is not logged into Facebook, so we're not sure if
// they are logged into this app or not.
document.getElementById('status').innerHTML = 'Please log ' +
'into Facebook.';
}
}
// This function is called when someone finishes with the Login
// Button. See the onlogin handler attached to it in the sample
// code below.
function checkLoginState() {
FB.getLoginStatus(function (response) {
statusChangeCallback(response);
});
}
window.fbAsyncInit = function () {
FB.init({
appId: '{your-app-id}',
cookie: true, // enable cookies to allow the server to access
// the session
xfbml: true, // parse social plugins on this page
version: 'v2.2' // use version 2.2
});
$('#searchbox').keyup(function () {
// Now that we've initialized the JavaScript SDK, we call
// FB.getLoginStatus(). This function gets the state of the
// person visiting this page and can return one of three states to
// the callback you provide. They can be:
//
// 1. Logged into your app ('connected')
// 2. Logged into Facebook, but not your app ('not_authorized')
// 3. Not logged into Facebook and can't tell if they are logged into
// your app or not.
//
// These three cases are handled in the callback function.
FB.getLoginStatus(function (response) {
statusChangeCallback(response);
});
$.each($('#options'), function (i, item) {
$('.opt').remove();
})
};
var t = document.getElementById('searchbox').value;
$.getJSON("/Home/SearchActionMethod", { word: t },
function (data) {
var ul = $('#options');
$.each(data, function (i, item) {
ul.addClass("nav nav-list bs-docs-sidenav ");
ul.append("<li class='opt dropdown-toggle' data-toggle='dropdown' style='background-color:white;width:280px;position:relative'><a href='#'>" + item + "</a></li>");
});
}
);
})
// Load the SDK asynchronously
</script>
}
// Here we run a very simple test of the Graph API after login is
// successful. See statusChangeCallback() for when this call is made.
function testAPI() {
console.log('Welcome! Fetching your information.... ');
FB.api('/me', function (response) {
console.log('Successful login for: ' + response.name);
document.getElementById('status').innerHTML =
'Thanks for logging in, ' + response.name + '!';
});
}
</script>

<fb:login-button scope="public_profile,email" onlogin="checkLoginState();"></fb:login-button>

<div id="status"></div>
<script>
window.fbAsyncInit = function () {
FB.init({
appId: '1626739400941856',
xfbml: true,
version: 'v2.4'
});
};
FB.logout(function (response) {
// Person is now logged out
});
FB.api('/me', function (response) {
console.log(JSON.stringify(response));
});
</script>

<hr />
<footer>

This file was deleted.