Subversion Repositories php-qbpwcf

Rev

Rev 3 | Rev 207 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 3 Rev 178
Line 7138... Line 7138...
7138
			}#if end
7138
			}#if end
7139
 
7139
 
7140
		#儲存css類別樣式
7140
		#儲存css類別樣式
7141
		$result["content"]=$result["content"].$createApplyCssStyle["content"];
7141
		$result["content"]=$result["content"].$createApplyCssStyle["content"];
7142
 
7142
 
-
 
7143
		#函式說明:
-
 
7144
		#創建針對html標籤的立即css樣式或限定套用類型的css樣式.
-
 
7145
		#回傳的結果:
-
 
7146
		#$result["status"],執行是否正常,"true"代表正常;"false"代表不正常.
-
 
7147
		#$result["error"],涵式錯誤訊息陣列
-
 
7148
		#$result["content"],css語法
-
 
7149
		#$result["function"],當前執行的函式名稱.
-
 
7150
		#$result["argu"],所使用的參數.
-
 
7151
		#必填的參數:
-
 
7152
		#$conf["htmlTagName"],字串陣列,為多個要套用樣式的html標籤名稱,若有階層請用「>」表示,ex:「a:hover」代表在<a></a>上滑過去時的樣式;若有從上而下的層級關係,則請用「>」表示,ex:「div>span>img」,就是針對有div標籤裡面的span標籤裡面的img標籤內容的樣式;也可以針對使用特定類別的html標籤來套用css樣式,ex:「div.pink」,就是針對套用pink類別的div標籤來套用css樣式;可以指定擁有特定屬性的標籤與class的元素來套用css樣式,ex:「div['data-selected=true'].specifyClassName」。
-
 
7153
		$conf["css::createApplyCssStyle"]["htmlTagName"]=array("body");
-
 
7154
		#$conf["attributes"],字串陣列,為屬性名稱
-
 
7155
		$conf["css::createApplyCssStyle"]["attributes"]=array("margin");
-
 
7156
		#$conf["content"],字串陣列,為屬性值
-
 
7157
		$conf["css::createApplyCssStyle"]["content"]=array("0px");
-
 
7158
		$createApplyCssStyle=css::createApplyCssStyle($conf["css::createApplyCssStyle"]);
-
 
7159
		unset($conf["css::createApplyCssStyle"]);
-
 
7160
 
-
 
7161
		#如果建立css樣式失敗
-
 
7162
		if($createApplyCssStyle["status"]==="false"){
-
 
7163
 
-
 
7164
			#設置執行失敗
-
 
7165
			$result["status"]="false";
-
 
7166
 
-
 
7167
			#設置執行錯誤訊息
-
 
7168
			$result["error"]=$createApplyCssStyle;
-
 
7169
 
-
 
7170
			#回傳結果
-
 
7171
			return $result;
-
 
7172
 
-
 
7173
			}#if end
-
 
7174
 
-
 
7175
		#儲存css類別樣式
-
 
7176
		$result["content"]=$result["content"].$createApplyCssStyle["content"];
-
 
7177
 
-
 
7178
 
7143
		#設置執行正常
7179
		#設置執行正常
7144
		$result["status"]="true";
7180
		$result["status"]="true";
7145
 
7181
 
7146
		#回傳結果
7182
		#回傳結果
7147
		return $result;
7183
		return $result;
7148
 
7184
 
7149
		}#function qbpwcfStyle end	
7185
		}#function qbpwcfStyle end
7150
		
7186
		
7151
	/*
7187
	/*
7152
	#函式說明:
7188
	#函式說明:
7153
	#建立bootstap樣式的hr
7189
	#建立bootstap樣式的hr
7154
	#回傳結果:
7190
	#回傳結果:
Line 7504... Line 7540...
7504
			//複製一份
7540
			//複製一份
7505
			fakeTitle=title.cloneNode(true);
7541
			fakeTitle=title.cloneNode(true);
7506
			
7542
			
7507
			//隱藏資料表的抬頭
7543
			//隱藏資料表的抬頭
7508
			title.style.opacity=0.0;
7544
			title.style.opacity=0.0;
7509
						
7545
			
7510
			//原始標題的樣式
7546
			//原始標題的樣式
7511
			titleComStyle=getComputedStyle(title.children[0].children[0]);
7547
			titleComStyle=getComputedStyle(title.children[0].children[0]);
7512
			
7548
			
7513
			//標題要放在相位置距離高度有 -XXpx的地方
7549
			//標題要放在相位置距離高度有 -XXpx的地方
7514
			titleTop=parseInt(titleComStyle.height)+parseInt(titleComStyle.borderTopWidth)+parseInt(titleComStyle.borderBottomWidth)+parseInt(titleComStyle.paddingTop)+parseInt(titleComStyle.paddingBottom);
7550
			titleTop=parseInt(titleComStyle.height)+parseInt(titleComStyle.borderTopWidth)+parseInt(titleComStyle.borderBottomWidth)+parseInt(titleComStyle.paddingTop)+parseInt(titleComStyle.paddingBottom);