summaryrefslogtreecommitdiff
path: root/frontend/beta/js/Clipperz/PM/Components/Import/CSVImport
Side-by-side diff
Diffstat (limited to 'frontend/beta/js/Clipperz/PM/Components/Import/CSVImport') (more/less context) (ignore whitespace changes)
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/Import/CSVImport/CSVImportColumns.js22
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/Import/CSVImport/CSVImportFields.js22
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/Import/CSVImport/CSVImportHeader.js22
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/Import/CSVImport/CSVImportNotes.js22
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/Import/CSVImport/CSVImportTitle.js22
5 files changed, 50 insertions, 60 deletions
diff --git a/frontend/beta/js/Clipperz/PM/Components/Import/CSVImport/CSVImportColumns.js b/frontend/beta/js/Clipperz/PM/Components/Import/CSVImport/CSVImportColumns.js
index 3f4952d..fef8e9e 100644
--- a/frontend/beta/js/Clipperz/PM/Components/Import/CSVImport/CSVImportColumns.js
+++ b/frontend/beta/js/Clipperz/PM/Components/Import/CSVImport/CSVImportColumns.js
@@ -1,118 +1,116 @@
/*
-Copyright 2008-2011 Clipperz Srl
+Copyright 2008-2013 Clipperz Srl
-This file is part of Clipperz Community Edition.
-Clipperz Community Edition is an online password manager.
+This file is part of Clipperz, the online password manager.
For further information about its features and functionalities please
refer to http://www.clipperz.com.
-* Clipperz Community Edition is free software: you can redistribute
- it and/or modify it under the terms of the GNU Affero General Public
- License as published by the Free Software Foundation, either version
- 3 of the License, or (at your option) any later version.
+* Clipperz is free software: you can redistribute it and/or modify it
+ under the terms of the GNU Affero General Public License as published
+ by the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
-* Clipperz Community Edition is distributed in the hope that it will
- be useful, but WITHOUT ANY WARRANTY; without even the implied
- warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+* Clipperz is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU Affero General Public License for more details.
* You should have received a copy of the GNU Affero General Public
- License along with Clipperz Community Edition. If not, see
- <http://www.gnu.org/licenses/>.
+ License along with Clipperz. If not, see http://www.gnu.org/licenses/.
*/
if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; }
if (typeof(Clipperz.PM.Components.Import) == 'undefined') { Clipperz.PM.Components.Import = {}; }
if (typeof(Clipperz.PM.Components.Import.CSVImport) == 'undefined') { Clipperz.PM.Components.Import.CSVImport = {}; }
//#############################################################################
Clipperz.PM.Components.Import.CSVImport.CSVImportColumns = function(anElement, args) {
args = args || {};
Clipperz.PM.Components.Import.CSVImport.CSVImportColumns.superclass.constructor.call(this, anElement, args);
this._mainComponent = args.mainComponent;
return this;
}
//=============================================================================
YAHOO.extendX(Clipperz.PM.Components.Import.CSVImport.CSVImportColumns, Clipperz.PM.Components.BaseComponent, {
'toString': function() {
return "Clipperz.PM.Components.Import.CSVImport.CSVImportColumns component";
},
//-------------------------------------------------------------------------
'mainComponent': function() {
return this._mainComponent;
},
//-------------------------------------------------------------------------
'render': function() {
var i,c;
var columnSelectorCheckboxCells;
var checkboxes;
var data;
//MochiKit.Logging.logDebug(">>> CSVImportColumns.render");
Clipperz.NotificationCenter.unregister(this);
MochiKit.Signal.disconnectAllTo(this);
this.element().update("");
data = this.mainComponent().parsedValues();
columnSelectorCheckboxCells = [];
c = data[0].length;
for (i=0; i<c; i++) {
columnSelectorCheckboxCells.push({tag:'th', valign:'top', cls:(this.mainComponent().isColumnSelected(i) ? 'selectedColumn': 'skippedColumn'), children:[
{tag:'input', type:'checkbox', id:this.getId('columnCheckbox_' + i), value:i}
]})
}
this.domHelper().append(this.element(), {tag:'div', children:[
{tag:'div', cls:'importStepDescription', htmlString:Clipperz.PM.Strings['CSV_ImportWizard_Columns']},
{tag:'div', id:this.getId('dataDiv'), cls:'csvImportPreview', children:[
{tag:'table', id:this.getId('previewDada'), cls:'csvImportPreview columns', cellspacing:'0', children:[
{tag:'thead', id:this.getId('previewData_thead'), children:[
{tag:'tr', children:columnSelectorCheckboxCells}
]},
{tag:'tbody', id:this.getId('previewData_tbody'), children:[]}
]}
]}
]});
c = data[0].length;
for (i=0; i<c; i++) {
if (this.mainComponent().isColumnSelected(i)) {
this.getDom('columnCheckbox_' + i).checked = true;
}
}
this.renderData(this.getElement('previewData_tbody'), data);
checkboxes = MochiKit.DOM.getElementsByTagAndClassName('input', null, this.getDom('previewData_thead'));
c = checkboxes.length;
for (i=0; i<c; i++) {
MochiKit.Signal.connect(checkboxes[i], 'onclick', this, 'renderDataHandler');
}
//MochiKit.Logging.logDebug("<<< CSVImportColumns.render");
},
//-------------------------------------------------------------------------
'renderData': function(anElement, someData) {
var config;
var i,c;
//MochiKit.Logging.logDebug(">>> CSVImportColumns.renderData");
// anElement.update("");
MochiKit.DOM.replaceChildNodes(anElement.dom);
diff --git a/frontend/beta/js/Clipperz/PM/Components/Import/CSVImport/CSVImportFields.js b/frontend/beta/js/Clipperz/PM/Components/Import/CSVImport/CSVImportFields.js
index f7dbd5d..e816380 100644
--- a/frontend/beta/js/Clipperz/PM/Components/Import/CSVImport/CSVImportFields.js
+++ b/frontend/beta/js/Clipperz/PM/Components/Import/CSVImport/CSVImportFields.js
@@ -1,118 +1,116 @@
/*
-Copyright 2008-2011 Clipperz Srl
+Copyright 2008-2013 Clipperz Srl
-This file is part of Clipperz Community Edition.
-Clipperz Community Edition is an online password manager.
+This file is part of Clipperz, the online password manager.
For further information about its features and functionalities please
refer to http://www.clipperz.com.
-* Clipperz Community Edition is free software: you can redistribute
- it and/or modify it under the terms of the GNU Affero General Public
- License as published by the Free Software Foundation, either version
- 3 of the License, or (at your option) any later version.
+* Clipperz is free software: you can redistribute it and/or modify it
+ under the terms of the GNU Affero General Public License as published
+ by the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
-* Clipperz Community Edition is distributed in the hope that it will
- be useful, but WITHOUT ANY WARRANTY; without even the implied
- warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+* Clipperz is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU Affero General Public License for more details.
* You should have received a copy of the GNU Affero General Public
- License along with Clipperz Community Edition. If not, see
- <http://www.gnu.org/licenses/>.
+ License along with Clipperz. If not, see http://www.gnu.org/licenses/.
*/
if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; }
if (typeof(Clipperz.PM.Components.Import) == 'undefined') { Clipperz.PM.Components.Import = {}; }
if (typeof(Clipperz.PM.Components.Import.CSVImport) == 'undefined') { Clipperz.PM.Components.Import.CSVImport = {}; }
//#############################################################################
Clipperz.PM.Components.Import.CSVImport.CSVImportFields = function(anElement, args) {
args = args || {};
Clipperz.PM.Components.Import.CSVImport.CSVImportFields.superclass.constructor.call(this, anElement, args);
this._mainComponent = args.mainComponent;
return this;
}
//=============================================================================
YAHOO.extendX(Clipperz.PM.Components.Import.CSVImport.CSVImportFields, Clipperz.PM.Components.BaseComponent, {
'toString': function() {
return "Clipperz.PM.Components.Import.CSVImport.CSVImportFields component";
},
//-------------------------------------------------------------------------
'mainComponent': function() {
return this._mainComponent;
},
//-------------------------------------------------------------------------
'render': function() {
var fieldsHeaderCells;
var titleColumnIndex;
var notesColumnIndex;
var i,c;
Clipperz.NotificationCenter.unregister(this);
MochiKit.Signal.disconnectAllTo(this);
this.element().update("");
titleColumnIndex = this.mainComponent().titleColumnIndex()
notesColumnIndex = this.mainComponent().notesColumnIndex()
fieldsHeaderCells = [];
fieldsHeaderCells.push({tag:'td', valign:'top', cls:'title', html:this.mainComponent().labelForColumn(titleColumnIndex)});
c = this.mainComponent().parsedValues()[0].length;
for (i=0; i<c; i++) {
if ((i != titleColumnIndex) && (i != notesColumnIndex) && (this.mainComponent().isColumnSelected(i))) {
var trimmedLabel;
trimmedLabel = Clipperz.Base.trim(this.mainComponent().labelForColumn(i));
fieldsHeaderCells.push({tag:'td', valign:'top', id:this.getId('fieldHeaderTD_' + i), cls:((trimmedLabel == "") ? 'missingLabelWarning' : (this.isColumnSetup(i) ? 'configuredColumn': 'unconfiguredColumn')), children:[
{tag:'span', html:((trimmedLabel == "") ? Clipperz.PM.Strings['CSV_ImportWizard_Fields_MissingLabelWarning'] : trimmedLabel)/*, cls:((trimmedLabel == "") ? 'missingLabelWarning' : '')*/},
{tag:'select', id:this.getId('select_' + i), name:i, children:[
{tag:'option', value:'UNDEFINED', html:"select data type", cls:'disabledOption'},
{tag:'option', value:'TXT', htmlString:Clipperz.PM.Strings['recordFieldTypologies']['TXT']['shortDescription']},
{tag:'option', value:'PWD', htmlString:Clipperz.PM.Strings['recordFieldTypologies']['PWD']['shortDescription']},
{tag:'option', value:'URL', htmlString:Clipperz.PM.Strings['recordFieldTypologies']['URL']['shortDescription']},
{tag:'option', value:'DATE', htmlString:Clipperz.PM.Strings['recordFieldTypologies']['DATE']['shortDescription']},
{tag:'option', value:'ADDR', htmlString:Clipperz.PM.Strings['recordFieldTypologies']['ADDR']['shortDescription']}
]}
]})
}
}
if (notesColumnIndex != -1) {
fieldsHeaderCells.push({tag:'td', valign:'top', cls:'notes', html:this.mainComponent().labelForColumn(notesColumnIndex)});
}
this.domHelper().append(this.element(), {tag:'div', children:[
{tag:'div', cls:'importStepDescription', htmlString:Clipperz.PM.Strings['CSV_ImportWizard_Fields']},
{tag:'div', id:this.getId('dataDiv'), children:[
{tag:'div', children:[
]},
{tag:'div', cls:'csvImportPreview', children:[
{tag:'table', id:this.getId('previewDada'), cls:'csvImportPreview', cellspacing:'0', children:[
{tag:'thead', id:this.getId('previewData_thead'), children:[
{tag:'tr', cls:'CSV_previewData_header', children:fieldsHeaderCells}
]},
{tag:'tbody', id:this.getId('previewData_tbody'), children:[]}
]}
]}
]}
]});
for (i=0; i<c; i++) {
if ((i != titleColumnIndex) && (i != notesColumnIndex) && (this.mainComponent().isColumnSelected(i))) {
Clipperz.DOM.selectOptionMatchingValue(this.getDom('select_' + i), this.mainComponent().typeForColumn(i));
diff --git a/frontend/beta/js/Clipperz/PM/Components/Import/CSVImport/CSVImportHeader.js b/frontend/beta/js/Clipperz/PM/Components/Import/CSVImport/CSVImportHeader.js
index 5cb8679..dbde138 100644
--- a/frontend/beta/js/Clipperz/PM/Components/Import/CSVImport/CSVImportHeader.js
+++ b/frontend/beta/js/Clipperz/PM/Components/Import/CSVImport/CSVImportHeader.js
@@ -1,118 +1,116 @@
/*
-Copyright 2008-2011 Clipperz Srl
+Copyright 2008-2013 Clipperz Srl
-This file is part of Clipperz Community Edition.
-Clipperz Community Edition is an online password manager.
+This file is part of Clipperz, the online password manager.
For further information about its features and functionalities please
refer to http://www.clipperz.com.
-* Clipperz Community Edition is free software: you can redistribute
- it and/or modify it under the terms of the GNU Affero General Public
- License as published by the Free Software Foundation, either version
- 3 of the License, or (at your option) any later version.
+* Clipperz is free software: you can redistribute it and/or modify it
+ under the terms of the GNU Affero General Public License as published
+ by the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
-* Clipperz Community Edition is distributed in the hope that it will
- be useful, but WITHOUT ANY WARRANTY; without even the implied
- warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+* Clipperz is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU Affero General Public License for more details.
* You should have received a copy of the GNU Affero General Public
- License along with Clipperz Community Edition. If not, see
- <http://www.gnu.org/licenses/>.
+ License along with Clipperz. If not, see http://www.gnu.org/licenses/.
*/
if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; }
if (typeof(Clipperz.PM.Components.Import) == 'undefined') { Clipperz.PM.Components.Import = {}; }
if (typeof(Clipperz.PM.Components.Import.CSVImport) == 'undefined') { Clipperz.PM.Components.Import.CSVImport = {}; }
//#############################################################################
Clipperz.PM.Components.Import.CSVImport.CSVImportHeader = function(anElement, args) {
args = args || {};
Clipperz.PM.Components.Import.CSVImport.CSVImportHeader.superclass.constructor.call(this, anElement, args);
this._mainComponent = args.mainComponent;
this._pendingDeferredLabelFieldHandlerEvents = 0;
return this;
}
//=============================================================================
YAHOO.extendX(Clipperz.PM.Components.Import.CSVImport.CSVImportHeader, Clipperz.PM.Components.BaseComponent, {
'toString': function() {
return "Clipperz.PM.Components.Import.CSVImport.CSVImportHeader component";
},
//-------------------------------------------------------------------------
'mainComponent': function() {
return this._mainComponent;
},
//-------------------------------------------------------------------------
'render': function() {
var thConfigs;
var i,c;
//MochiKit.Logging.logDebug(">>> CSVImportHeader.render");
Clipperz.NotificationCenter.unregister(this);
MochiKit.Signal.disconnectAllTo(this);
thConfigs = [];
c = this.mainComponent().parsedValues()[0].length;
for (i=0; i<c; i++) {
if (this.mainComponent().isColumnSelected(i)) {
// thConfigs.push({tag:'th', children:[{tag:'input', type:'text', id:this.getId('headerTextField_' + i), value:this.mainComponent().labelForColumn(i)}]});
thConfigs.push({tag:'th', children:[{tag:'input', type:'text', id:this.getId('headerTextField_' + i), value:""}]});
}
}
this.element().update("");
this.domHelper().append(this.element(), {tag:'div', children:[
{tag:'div', cls:'importStepDescription', htmlString:Clipperz.PM.Strings['CSV_ImportWizard_Header']},
{tag:'div', cls:'importStepParameters', children:[
{tag:'input', type:'checkbox', name:'isFistRowHeader', id:this.getId('isFirstRowHeader_checkbox')},
{tag:'span', id:this.getId('isFirstRowHeader_span'), cls:'clickableSpan', htmlString:Clipperz.PM.Strings['CSV_ImportWizard_Header_Settings_firstRowHeaderLabel']}
]},
{tag:'div', id:this.getId('dataDiv'), children:[
{tag:'div', cls:'csvImportPreview', children:[
{tag:'table', id:this.getId('previewDada'), cls:'csvImportPreview header', cellspacing:'0', children:[
{tag:'thead', children:[{tag:'tr', children:thConfigs}]},
{tag:'tbody', id:this.getId('previewData_tbody')}
]}
]}
]}
]});
for (i=0; i<c; i++) {
if (this.mainComponent().isColumnSelected(i)) {
this.getElement('headerTextField_' + i).dom.value = this.mainComponent().labelForColumn(i);
}
}
this.renderData(this.getElement('previewData_tbody'), this.mainComponent().parsedValues());
if (this.mainComponent().isFirstRowHeader()) {
this.getDom('isFirstRowHeader_checkbox').click();
}
c = this.mainComponent().parsedValues()[0].length;
for (i=0; i<c; i++) {
if (this.mainComponent().isColumnSelected(i)) {
MochiKit.Signal.connect(this.getDom('headerTextField_' + i), 'onchange', MochiKit.Base.partial(MochiKit.Base.method(this, 'labelFieldHandler'), i));
MochiKit.Signal.connect(this.getDom('headerTextField_' + i), 'onkeypress', MochiKit.Base.partial(MochiKit.Base.method(this, 'deferredLabelFieldHandler'), i));
}
}
MochiKit.Signal.connect(this.getDom('isFirstRowHeader_checkbox'), 'onclick', this, 'toggleFirstRowHeaderCheckboxHandler');
if (Clipperz_IEisBroken != true) {
MochiKit.Signal.connect(this.getDom('isFirstRowHeader_span'), 'onclick', this.getDom('isFirstRowHeader_checkbox'), 'click');
}
diff --git a/frontend/beta/js/Clipperz/PM/Components/Import/CSVImport/CSVImportNotes.js b/frontend/beta/js/Clipperz/PM/Components/Import/CSVImport/CSVImportNotes.js
index 6344e06..ccfdeca 100644
--- a/frontend/beta/js/Clipperz/PM/Components/Import/CSVImport/CSVImportNotes.js
+++ b/frontend/beta/js/Clipperz/PM/Components/Import/CSVImport/CSVImportNotes.js
@@ -1,118 +1,116 @@
/*
-Copyright 2008-2011 Clipperz Srl
+Copyright 2008-2013 Clipperz Srl
-This file is part of Clipperz Community Edition.
-Clipperz Community Edition is an online password manager.
+This file is part of Clipperz, the online password manager.
For further information about its features and functionalities please
refer to http://www.clipperz.com.
-* Clipperz Community Edition is free software: you can redistribute
- it and/or modify it under the terms of the GNU Affero General Public
- License as published by the Free Software Foundation, either version
- 3 of the License, or (at your option) any later version.
+* Clipperz is free software: you can redistribute it and/or modify it
+ under the terms of the GNU Affero General Public License as published
+ by the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
-* Clipperz Community Edition is distributed in the hope that it will
- be useful, but WITHOUT ANY WARRANTY; without even the implied
- warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+* Clipperz is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU Affero General Public License for more details.
* You should have received a copy of the GNU Affero General Public
- License along with Clipperz Community Edition. If not, see
- <http://www.gnu.org/licenses/>.
+ License along with Clipperz. If not, see http://www.gnu.org/licenses/.
*/
if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; }
if (typeof(Clipperz.PM.Components.Import) == 'undefined') { Clipperz.PM.Components.Import = {}; }
if (typeof(Clipperz.PM.Components.Import.CSVImport) == 'undefined') { Clipperz.PM.Components.Import.CSVImport = {}; }
//#############################################################################
Clipperz.PM.Components.Import.CSVImport.CSVImportNotes = function(anElement, args) {
args = args || {};
Clipperz.PM.Components.Import.CSVImport.CSVImportNotes.superclass.constructor.call(this, anElement, args);
this._mainComponent = args.mainComponent;
return this;
}
//=============================================================================
YAHOO.extendX(Clipperz.PM.Components.Import.CSVImport.CSVImportNotes, Clipperz.PM.Components.BaseComponent, {
'toString': function() {
return "Clipperz.PM.Components.Import.CSVImport.CSVImportNotes component";
},
//-------------------------------------------------------------------------
'mainComponent': function() {
return this._mainComponent;
},
//-------------------------------------------------------------------------
'render': function() {
var notesSelectorCheckboxCells;
var totalNumberOfColumns;
var titleColumnIndex;
var notesColumnIndex;
var i,c;
Clipperz.NotificationCenter.unregister(this);
MochiKit.Signal.disconnectAllTo(this);
this.element().update("");
titleColumnIndex = this.mainComponent().titleColumnIndex()
notesColumnIndex = this.mainComponent().notesColumnIndex()
totalNumberOfColumns = this.mainComponent().parsedValues()[0].length;
notesSelectorCheckboxCells = [{tag:'th', cls:'title', html:this.mainComponent().labelForColumn(titleColumnIndex)}];
c = totalNumberOfColumns;
for (i=0; i<c; i++) {
if ((i != titleColumnIndex) && (this.mainComponent().isColumnSelected(i))) {
notesSelectorCheckboxCells.push({tag:'th', id:this.getId('th_' + i), valign:'top', children:[
{tag:'input', type:'radio', id:this.getId('radio_' + i), name:'CSVImportNotesColumn', value:i},
{tag:'span', cls:'clickableSpan', id:this.getId('columnLabel_' + i), html:this.mainComponent().labelForColumn(i)}
]})
}
}
this.domHelper().append(this.element(), {tag:'div', children:[
{tag:'div', cls:'importStepDescription', htmlString:Clipperz.PM.Strings['CSV_ImportWizard_Notes']},
{tag:'div', id:this.getId('dataDiv'), children:[
{tag:'div', cls:'importStepParameters', children:[
{tag:'input', id:this.getId('doNotSetNotes_radio'), type:'radio', name:'CSVImportNotesColumn', value:-1},
{tag:'span', id:this.getId('doNotSetNotes_span'), cls:'clickableSpan', htmlString:Clipperz.PM.Strings['CSV_ImportWizard_Notes_Settings_noSelectionLabel']}
]},
{tag:'div', cls:'csvImportPreview', children:[
{tag:'table', id:this.getId('previewDada'), cls:'csvImportPreview', cellspacing:'0', children:[
{tag:'thead', id:this.getId('previewData_thead'), children:[
{tag:'tr', children:notesSelectorCheckboxCells}
]},
{tag:'tbody', id:this.getId('previewData_tbody'), children:[]}
]}
]}
]}
]});
this.renderData(this.getElement('previewData_tbody'), this.mainComponent().parsedValues());
if ((notesColumnIndex >= totalNumberOfColumns) || (notesColumnIndex == titleColumnIndex) || !(this.mainComponent().isColumnSelected(notesColumnIndex))) {
this.mainComponent().setNotesColumnIndex(-1);
notesColumnIndex = -1;
}
c = totalNumberOfColumns;
for (i=0; i<c; i++) {
if ((i != titleColumnIndex) && (this.mainComponent().isColumnSelected(i))) {
MochiKit.Signal.connect(this.getDom('radio_' + i), 'onclick', this, 'renderDataHandler');
if (Clipperz_IEisBroken != true) {
MochiKit.Signal.connect(this.getDom('columnLabel_' + i), 'onclick', this.getDom('radio_' + i), 'click');
}
diff --git a/frontend/beta/js/Clipperz/PM/Components/Import/CSVImport/CSVImportTitle.js b/frontend/beta/js/Clipperz/PM/Components/Import/CSVImport/CSVImportTitle.js
index aa57580..4b2149a 100644
--- a/frontend/beta/js/Clipperz/PM/Components/Import/CSVImport/CSVImportTitle.js
+++ b/frontend/beta/js/Clipperz/PM/Components/Import/CSVImport/CSVImportTitle.js
@@ -1,118 +1,116 @@
/*
-Copyright 2008-2011 Clipperz Srl
+Copyright 2008-2013 Clipperz Srl
-This file is part of Clipperz Community Edition.
-Clipperz Community Edition is an online password manager.
+This file is part of Clipperz, the online password manager.
For further information about its features and functionalities please
refer to http://www.clipperz.com.
-* Clipperz Community Edition is free software: you can redistribute
- it and/or modify it under the terms of the GNU Affero General Public
- License as published by the Free Software Foundation, either version
- 3 of the License, or (at your option) any later version.
+* Clipperz is free software: you can redistribute it and/or modify it
+ under the terms of the GNU Affero General Public License as published
+ by the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
-* Clipperz Community Edition is distributed in the hope that it will
- be useful, but WITHOUT ANY WARRANTY; without even the implied
- warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+* Clipperz is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU Affero General Public License for more details.
* You should have received a copy of the GNU Affero General Public
- License along with Clipperz Community Edition. If not, see
- <http://www.gnu.org/licenses/>.
+ License along with Clipperz. If not, see http://www.gnu.org/licenses/.
*/
if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; }
if (typeof(Clipperz.PM.Components.Import) == 'undefined') { Clipperz.PM.Components.Import = {}; }
if (typeof(Clipperz.PM.Components.Import.CSVImport) == 'undefined') { Clipperz.PM.Components.Import.CSVImport = {}; }
//#############################################################################
Clipperz.PM.Components.Import.CSVImport.CSVImportTitle = function(anElement, args) {
args = args || {};
Clipperz.PM.Components.Import.CSVImport.CSVImportTitle.superclass.constructor.call(this, anElement, args);
this._mainComponent = args.mainComponent;
return this;
}
//=============================================================================
YAHOO.extendX(Clipperz.PM.Components.Import.CSVImport.CSVImportTitle, Clipperz.PM.Components.BaseComponent, {
'toString': function() {
return "Clipperz.PM.Components.Import.CSVImport.CSVImportTitle component";
},
//-------------------------------------------------------------------------
'mainComponent': function() {
return this._mainComponent;
},
//-------------------------------------------------------------------------
'render': function() {
var titleSelectorCheckboxCells;
var titleColumnIndex;
var i,c;
Clipperz.NotificationCenter.unregister(this);
MochiKit.Signal.disconnectAllTo(this);
this.element().update("");
titleColumnIndex = this.mainComponent().titleColumnIndex()
titleSelectorCheckboxCells = [];
c = this.mainComponent().parsedValues()[0].length;
for (i=0; i<c; i++) {
if (this.mainComponent().isColumnSelected(i)) {
titleSelectorCheckboxCells.push({tag:'th', valign:'top', id:this.getId('th_' + i), children:[
{tag:'input', type:'radio', id:this.getId('radio_' + i), name:'CSVImportTitleColumn', value:i},
{tag:'span', cls:'clickableSpan', id:this.getId('columnLabel_' + i), html:this.mainComponent().labelForColumn(i)}
]})
}
}
if (titleColumnIndex >= titleSelectorCheckboxCells.length) {
this.mainComponent().setTitleColumnIndex(-1);
}
this.domHelper().append(this.element(), {tag:'div', children:[
{tag:'div', cls:'importStepDescription', htmlString:Clipperz.PM.Strings['CSV_ImportWizard_Title']},
{tag:'div', id:this.getId('dataDiv'), cls:'csvImportPreview', children:[
{tag:'table', id:this.getId('previewDada'), cls:'csvImportPreview', cellspacing:'0', children:[
{tag:'thead', id:this.getId('previewData_thead'), children:[
{tag:'tr', children:titleSelectorCheckboxCells}
]},
{tag:'tbody', id:this.getId('previewData_tbody'), children:[]}
]}
]}
]});
this.renderData(this.getElement('previewData_tbody'), this.mainComponent().parsedValues());
c = this.mainComponent().parsedValues()[0].length;
for (i=0; i<c; i++) {
if (this.mainComponent().isColumnSelected(i)) {
MochiKit.Signal.connect(this.getDom('radio_' + i), 'onclick', this, 'renderDataHandler');
if (Clipperz_IEisBroken != true) {
MochiKit.Signal.connect(this.getDom('columnLabel_' + i), 'onclick', this.getDom('radio_' + i), 'click');
}
}
}
if (titleColumnIndex != -1) {
this.getDom('radio_' + titleColumnIndex).click();
} else {
this.mainComponent().nextButton().disable();
}
},
//-------------------------------------------------------------------------