Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Push each functional area to its own file. Thus sufia.js becomes just a manifest. * Leverage bootstrap's alert function instead of having our own. * Reenabled feature spec for proxy deposit
- Loading branch information
Showing
18 changed files
with
187 additions
and
265 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,23 @@ | ||
Sufia = {}; | ||
// Once, javascript is written in a modular format, all initialization | ||
// code should be called from here. | ||
Sufia = { | ||
initialize: function() { | ||
this.save_work_control(); | ||
this.popovers(); | ||
}, | ||
|
||
save_work_control: function() { | ||
var sw = require('sufia/save_work/save_work_control'); | ||
new sw.SaveWorkControl($("#form-progress")).activate(); | ||
}, | ||
|
||
// initialize popover helpers | ||
popovers: function() { | ||
$("a[data-toggle=popover]").popover({ html: true }) | ||
.click(function() { return false; }); | ||
} | ||
}; | ||
|
||
Blacklight.onLoad(function() { | ||
Sufia.initialize(); | ||
}); |
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,14 @@ | ||
Blacklight.onLoad(function() { | ||
/* | ||
* facets lists | ||
*/ | ||
$("li.expandable").click(function(){ | ||
$(this).next("ul").slideToggle(); | ||
$(this).find('i').toggleClass("glyphicon-chevron-right glyphicon-chevron-down"); | ||
}); | ||
|
||
$("li.expandable_new").click(function(){ | ||
$(this).find('i').toggleClass("glyphicon-chevron-right glyphicon-chevron-down"); | ||
}); | ||
|
||
}); //end of Blacklight.onload |
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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
//override the blacklight default to submit | ||
//form when sort by or show per page change | ||
Blacklight.do_select_submit = function() { | ||
$(Blacklight.do_select_submit.selector).each(function() { | ||
var select = $(this); | ||
select.closest("form").find("input[type=submit]").show(); | ||
select.bind("change", function() { | ||
return false; | ||
}); | ||
}); | ||
}; | ||
Blacklight.do_select_submit.selector = "form.sort select, form.per_page select"; |
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,22 @@ | ||
Blacklight.onLoad(function() { | ||
function toggle_icon(itag){ | ||
itag.toggleClass("caret"); | ||
itag.toggleClass("caret up"); | ||
} | ||
|
||
$(".sorts-dash").click(function(){ | ||
var itag =$(this).find('i'); | ||
toggle_icon(itag); | ||
sort = itag.attr('class') == "caret" ? itag.attr('id')+' desc' : itag.attr('id') +' asc'; | ||
$('#sort').val(sort).selected = true; | ||
$("#dashboard_sort_submit").click(); | ||
}); | ||
|
||
$(".sorts").click(function(){ | ||
var itag =$(this).find('i'); | ||
toggle_icon(itag); | ||
sort = itag.attr('class') == "caret up" ? itag.attr('id')+' desc': itag.attr('id'); | ||
$('input[name="sort"]').attr('value', sort); | ||
$("#user_submit").click(); | ||
}); | ||
}); //end of Blacklight.onload |
This file was deleted.
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
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
Oops, something went wrong.