mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-15 09:04:39 +00:00
src: whitespace sweep and a missing \
This commit is contained in:
parent
933ef0c318
commit
b229c5019f
@ -32,7 +32,7 @@ namespace OPNsense\Core\Api;
|
||||
|
||||
use \OPNsense\Base\ApiControllerBase;
|
||||
use \OPNsense\Core\Backend;
|
||||
use OPNsense\Core\Config;
|
||||
use \OPNsense\Core\Config;
|
||||
|
||||
/**
|
||||
* Class FirmwareController
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
(function( $ ){
|
||||
$.fn.qrcode = function(options) {
|
||||
// if options is string,
|
||||
// if options is string,
|
||||
if( typeof options === 'string' ){
|
||||
options = { text: options };
|
||||
}
|
||||
@ -39,8 +39,8 @@
|
||||
ctx.fillStyle = qrcode.isDark(row, col) ? options.foreground : options.background;
|
||||
var w = (Math.ceil((col+1)*tileW) - Math.floor(col*tileW));
|
||||
var h = (Math.ceil((row+1)*tileW) - Math.floor(row*tileW));
|
||||
ctx.fillRect(Math.round(col*tileW),Math.round(row*tileH), w, h);
|
||||
}
|
||||
ctx.fillRect(Math.round(col*tileW),Math.round(row*tileH), w, h);
|
||||
}
|
||||
}
|
||||
// return just built canvas
|
||||
return canvas;
|
||||
@ -52,7 +52,7 @@
|
||||
var qrcode = new QRCode(options.typeNumber, options.correctLevel);
|
||||
qrcode.addData(options.text);
|
||||
qrcode.make();
|
||||
|
||||
|
||||
// create table element
|
||||
var $table = $('<table></table>')
|
||||
.css("width", options.width+"px")
|
||||
@ -60,7 +60,7 @@
|
||||
.css("border", "0px")
|
||||
.css("border-collapse", "collapse")
|
||||
.css('background-color', options.background);
|
||||
|
||||
|
||||
// compute tileS percentage
|
||||
var tileW = options.width / qrcode.getModuleCount();
|
||||
var tileH = options.height / qrcode.getModuleCount();
|
||||
@ -68,18 +68,18 @@
|
||||
// draw in the table
|
||||
for(var row = 0; row < qrcode.getModuleCount(); row++ ){
|
||||
var $row = $('<tr></tr>').css('height', tileH+"px").appendTo($table);
|
||||
|
||||
|
||||
for(var col = 0; col < qrcode.getModuleCount(); col++ ){
|
||||
$('<td></td>')
|
||||
.css('width', tileW+"px")
|
||||
.css('background-color', qrcode.isDark(row, col) ? options.foreground : options.background)
|
||||
.appendTo($row);
|
||||
}
|
||||
}
|
||||
}
|
||||
// return just built canvas
|
||||
return $table;
|
||||
}
|
||||
|
||||
|
||||
|
||||
return this.each(function(){
|
||||
var element = options.render == "canvas" ? createCanvas() : createTable();
|
||||
|
||||
@ -17,4 +17,4 @@ 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.
|
||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user