Skip to content

Commit 65f45df

Browse files
author
Maor Shabo
committed
fix separatorVisible attribute
1 parent d6e3711 commit 65f45df

File tree

3 files changed

+13
-6
lines changed

3 files changed

+13
-6
lines changed

dist/angular-csv-import.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*! angular-csv-import - v0.0.16 - 2015-05-12
1+
/*! angular-csv-import - v0.0.16 - 2015-06-16
22
* Copyright (c) 2015 ; Licensed */
33
'use strict';
44

@@ -14,12 +14,16 @@ csvImport.directive('ngCsvImport', function() {
1414
header: '=',
1515
headerVisible: '=',
1616
separator: '=',
17+
separatorVisible: '=',
1718
result: '='
1819
},
19-
template: '<div><div ng-show="header && headerVisible"><div class="label">Header</div><input type="checkbox" ng-model="header"></div>'+
20-
'<div ng-show="separator" ><div class="label">Seperator</div><input type="text" ng-change="changeSeparator" ng-model="separator"></div>'+
20+
template: '<div><div ng-show="headerVisible"><div class="label">Header</div><input type="checkbox" ng-model="header"></div>'+
21+
'<div ng-show="separatorVisible"><div class="label">Seperator</div><input type="text" ng-change="changeSeparator" ng-model="separator"></div>'+
2122
'<div><input class="btn cta gray" type="file"/></div></div>',
2223
link: function(scope, element) {
24+
scope.separatorVisible = scope.separatorVisible || false;
25+
scope.headerVisible = scope.headerVisible || false;
26+
2327
element.on('keyup', function(e){
2428
if ( scope.content != null ) {
2529
var content = {

dist/angular-csv-import.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/angular-csv-import.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,12 @@ csvImport.directive('ngCsvImport', function() {
1616
result: '='
1717
},
1818
template: '<div><div ng-show="headerVisible"><div class="label">Header</div><input type="checkbox" ng-model="header"></div>'+
19-
'<div ng-show="separatorVisible" ><div class="label">Seperator</div><input type="text" ng-change="changeSeparator" ng-model="separator"></div>'+
19+
'<div ng-show="separatorVisible"><div class="label">Seperator</div><input type="text" ng-change="changeSeparator" ng-model="separator"></div>'+
2020
'<div><input class="btn cta gray" type="file"/></div></div>',
2121
link: function(scope, element) {
22+
scope.separatorVisible = scope.separatorVisible || false;
23+
scope.headerVisible = scope.headerVisible || false;
24+
2225
element.on('keyup', function(e){
2326
if ( scope.content != null ) {
2427
var content = {

0 commit comments

Comments
 (0)