Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-7301] Android: JSS with import and js with include files not working

GitHub Issuen/a
TypeBug
PriorityTrivial
StatusClosed
ResolutionWon't Fix
Resolution Date2013-11-15T21:49:55.000+0000
Affected Version/sRelease 1.8.0, Release 1.8.0.1, Release 2.0.0, Release 2.0.1, Release 3.1.0
Fix Version/sn/a
ComponentsAndroid
Labelscore, parity, regression
ReporterRadamantis Torres-Lechuga
AssigneeJosh Roesslein
Created2012-01-19T13:49:19.000+0000
Updated2017-03-22T17:32:44.000+0000

Description

Actual behavior

Working with an app.js with an include an app.jss with a require, and adding labels to the window, those are not getting the styles dictated by the jss files

Expected behavior

Jss working as used to work on 1.7.6 with the same structure

Files

var gt = {};
gt.ui={};


Ti.include('/incs/incs.js');

gt.ui.makeWin =  function(){
	
	var win1 = Titanium.UI.createWindow({  
	    backgroundColor:'#fff',
		navBarHidden:true
	});	

	var label1 = gt.ui.makeLabel('label1');

	var label2 = gt.ui.makeLabel('label2');

	win1.add(label1);
	win1.add(label2);
	return win1;
};


var win = gt.ui.makeWin();
win.open();	
@import 'lay/style.jss';

#label2 {
	color:'#f0f';
	text:'I am Window 2';
	fontSize:40;
	textAlign:'center';
	height:80;
	width:'auto';
}
Ti.API.info('Including the inc file');
gt.ui.makeLabel =  function(id) {
	
	var label = Titanium.UI.createLabel({
		id:id,
		className:'button'
	});
	
	return label;
};
#label1 {
	color:'#f00';
	top:0;
	text-align:'center';
	text:'I am label 1';
	height:40;
	width:'auto';
}

.button {
	background-color:'#00f';
}

Attachments

FileDateSize
APP-628983 2.zip2012-05-17T15:42:32.000+00002435415

Comments

  1. Junaid Younus 2012-05-17

    Issue still exists with 2.0.1GA2 on a Samsung Galaxy S2. Seems to work fine on the iOS simulator. I have also attached a sample project with the same code, to save time setting it up.
  2. john q hiu 2012-10-23

    The error is still there. Same as http://developer.appcelerator.com/question/134477/ (very simple example) The problem is that JSS is not working at all if you use 'require' (commonjs) files under Android SDK 2.1.3. (maybe it's a context problem?) Some progress? Thanks in advance
  3. jithinpv 2013-04-26

    issue reproduces Tested with Titanium Studio, build: 3.0.1.201212181159 Titanium SDK version: 3.1.0 Android Emulator: Android SDK version: 2.2
  4. Ingo Muschenetz 2013-11-15

    JSS has been deprecated. We won't be fixing this.
  5. Lee Morris 2017-03-22

    Closing ticket as the issue will not fix and with reference to the above comments. JSS has been deprecated.

JSON Source