-
Notifications
You must be signed in to change notification settings - Fork 5
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 #7 from UNB-GPPMDS-2014/approval
Approval
- Loading branch information
Showing
105 changed files
with
6,737 additions
and
1,953 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
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
$(function () { | ||
$('.tree li:has(ul)').addClass('parent_li').find(' > span').attr('title', 'Collapse this branch'); | ||
$('.tree li ul > li').hide(); | ||
$('.tree li.parent_li > span').on('click', function (e) { | ||
var children = $(this).parent('li.parent_li').find(' > ul > li'); | ||
if (children.is(":visible")) { | ||
children.hide('fast'); | ||
$(this).attr('title', 'Expand this branch').find(' > i').addClass('icon-plus-sign').removeClass('icon-minus-sign'); | ||
} else { | ||
children.show('fast'); | ||
$(this).attr('title', 'Collapse this branch').find(' > i').addClass('icon-minus-sign').removeClass('icon-plus-sign'); | ||
} | ||
e.stopPropagation(); | ||
}); | ||
}); |
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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
function changeIcon(o){ | ||
obj = document.getElementById(o); | ||
if (obj.className=="icon icon-chevron-down") | ||
setTimeout(function(){obj.className= "icon icon-chevron-up"}, 800); | ||
else if (obj.className=="icon icon-chevron-up") | ||
obj.className= "icon icon-chevron-down"; | ||
} |
Large diffs are not rendered by default.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,43 @@ | ||
(function() | ||
{ | ||
function build_row(data) | ||
{ | ||
var html = "<tr>"; | ||
|
||
html += "<td><a href='/suppliers/"+data.id+"'>"+data.fantasy_name_supplier+"</a>"+"</td>"; | ||
html += "<td> "+data.cnpj+"</td>"; | ||
|
||
html += "</tr>"; | ||
return html; | ||
} | ||
|
||
function custom_search(search, type_search) | ||
{ | ||
$.ajax( | ||
{ | ||
url: "/supplier/custom_search", | ||
type: "GET", | ||
data: { "search":search, "type_search":type_search,"page":1 }, | ||
success : function(response) | ||
{ | ||
var html = ""; | ||
for(var i = 0; i < response.length; i++) | ||
{ | ||
html += build_row(response[i]); | ||
} | ||
$("#suppliers").html(html); | ||
} | ||
}); | ||
} | ||
$(document).ready(function() | ||
{ | ||
$("#supplier_search_button").click(function() | ||
{ | ||
var search = $("#supplier_search_text").val(); | ||
var type_search = $(".search_type:checked").val(); | ||
|
||
custom_search(search, type_search); | ||
|
||
}); | ||
}); | ||
})(); |
Oops, something went wrong.