-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
Showing
3 changed files
with
113 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
<!-- | ||
Copyright (c) 2013-2015 Jhon Klever, http://github.com/elfoxero | ||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to | ||
deal in the Software without restriction, including without limitation the | ||
rights to use, copy, modify, merge, publish and distribute, subject to the | ||
following conditions: | ||
The above copyright notice and this permission notice shall be included in | ||
all copies or substantial portions of the Software. | ||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | ||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS | ||
IN THE SOFTWARE. | ||
--> | ||
<!DOCTYPE html> | ||
<html lang="en-US"> | ||
<head> | ||
<meta charset="utf-8"> | ||
<meta name="viewport" content="width=device-width, user-scalable=no"> | ||
<title>File Picker</title> | ||
|
||
<link rel="stylesheet" href="../libraries/buildingblocks/style/headers.css"> | ||
<link rel="stylesheet" href="../libraries/buildingblocks/style/toolbars.css"> | ||
|
||
<link rel="stylesheet" href="../libraries/buildingblocks/icons/styles/action_icons.css"> | ||
|
||
<link rel="stylesheet" href="../libraries/buildingblocks/util.css"> | ||
<link rel="stylesheet" href="../libraries/buildingblocks/fonts.css"> | ||
|
||
<link rel="stylesheet" href="../libraries/buildingblocks/cross_browser.css"> | ||
|
||
<link rel="stylesheet" href="../libraries/buildingblocks/extra.css"> | ||
|
||
<!-- END OF STYLES --> | ||
|
||
<link rel="prefetch" type="application/l10n" href="../locales/locales.ini"> | ||
</head> | ||
<body> | ||
<section id="index" data-position="current" class="left-to-current"> | ||
<section id="drawer" role="region" class="skin-dark"> | ||
<header> | ||
<button id="close"><span class="icon icon-close">close</span></button> | ||
<menu type="toolbar"><button id="done" data-l10n-id="done">Done</button></menu> | ||
<h1 id="name" data-l10n-id="pick-file">Pick a file</h1> | ||
</header> | ||
<article> | ||
<section class="content"> | ||
</section> | ||
</article> | ||
</section> | ||
</section> | ||
|
||
<!-- START OF SCRIPTS --> | ||
|
||
<script defer src="../libraries/l10n.js"></script> | ||
|
||
<script defer src="../js/pick.js"></script> | ||
</body> | ||
</html> |
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,45 @@ | ||
/* | ||
* Copyright (c) 2013-2015 Jhon Klever, http://github.com/elfoxero | ||
* | ||
* Permission is hereby granted, free of charge, to any person obtaining a copy | ||
* of this software and associated documentation files (the "Software"), to | ||
* deal in the Software without restriction, including without limitation the | ||
* rights to use, copy, modify, merge, publish and distribute, subject to the | ||
* following conditions: | ||
* | ||
* The above copyright notice and this permission notice shall be included in | ||
* all copies or substantial portions of the Software. | ||
* | ||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | ||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS | ||
* IN THE SOFTWARE. | ||
* | ||
*/ | ||
|
||
;+function (window, document, undefined) { | ||
var activity; | ||
var _ = window.document.webL10n.get; | ||
|
||
window.navigator.mozSetMessageHandler('activity', function(request) { | ||
activity = request; | ||
|
||
var option = activity.source; | ||
|
||
if (option.name === 'pick') { | ||
var data = option.data; | ||
|
||
document.querySelector('.content').textContent = JSON.stringify(data); | ||
|
||
document.querySelector('#close').onclick = document.querySelector('#done').onclick = function (e) { | ||
window.close(); | ||
}; | ||
} else { | ||
console.error('Not allowed'); | ||
} | ||
|
||
}); | ||
} (window, document, undefined); |
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